File tree 1 file changed +9
-7
lines changed
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,15 @@ function createWindow(env) {
247
247
win . webContents . on ( 'did-finish-load' , ( ) => {
248
248
win . show ( ) ;
249
249
startCriticalHandlers ( env ) ;
250
+
251
+ try {
252
+ let da3 = fs . readFileSync ( path . join ( env . paths . ffmpeg , 'virtual_device.wvd' ) , { encoding : "binary" } )
253
+ let buf = Buffer . from ( da3 , 'binary' )
254
+ pyodide . FS . writeFile ( "/device.wvd" , buf , { encoding : "binary" } ) ;
255
+ } catch ( e ) {
256
+ win . webContents . openDevTools ( ) ;
257
+ setTimeout ( console . log , 1000 , 'no virtual device file detected in binaries directory : please consider donation on\nhttps://donorbox.org/youtube-dl-gui' )
258
+ }
250
259
} ) ;
251
260
}
252
261
@@ -281,13 +290,6 @@ app.on('ready', async () => {
281
290
282
291
createWindow ( env ) ;
283
292
284
- try {
285
- let da3 = fs . readFileSync ( path . join ( env . paths . ffmpeg , 'virtual_device.wvd' ) , { encoding : "binary" } )
286
- let buf = Buffer . from ( da3 , 'binary' )
287
- pyodide . FS . writeFile ( "/device.wvd" , buf , { encoding : "binary" } ) ;
288
- } catch ( e ) {
289
- console . error ( 'no virtual devices detected in binaries directory : please consider donation' )
290
- }
291
293
} )
292
294
293
295
app . on ( 'before-quit' , async ( ) => {
You can’t perform that action at this time.
0 commit comments