@@ -46,10 +46,13 @@ class VideoProcessor {
4646 selectFileBtn = document . getElementById ( 'selectFiles' ) ;
4747 processVideosBtn = document . getElementById ( 'processVideos' ) ;
4848 progressBar = new ProgressBar ( document . getElementById ( 'progressBar' ) ) ;
49+ projectSavePathBtn = document . getElementById ( 'projectSavePathBtn' ) ;
50+
4951
5052 //FFmpeg errors
5153 ffmpegNoSpaceLeftError = 'No space left on device' ;
5254 ffmpegNoMap3 = 'Stream map \'0:3\' matches no streams.' ;
55+ ffmpegCantOpen = 'Impossible to open' ;
5356
5457 //Flags
5558 ffmpegBreak = false ;
@@ -81,6 +84,7 @@ class VideoProcessor {
8184
8285 this . selectFileBtn . setAttribute ( 'disabled' , 'disabled' ) ;
8386 this . processVideosBtn . setAttribute ( 'disabled' , 'disabled' ) ;
87+ this . projectSavePathBtn . setAttribute ( 'disabled' , 'disabled' ) ;
8488
8589 this . progressBar . color = ProgressBar . COLOR_ORANGE ;
8690 this . progressBar . maximum = 100 ;
@@ -191,15 +195,23 @@ class VideoProcessor {
191195
192196 if ( ! this . ffmpegBreak && data . includes ( this . ffmpegNoMap3 ) ) {
193197 this . ffmpegBreak = true ;
194- Alert . appendToContainer ( new Alert ( 'Error: MP4 file not valid (It\'s not a GoPro File)' , Alert . ALERT_DANGER , 5000 ) . toHTML ( ) ) ;
198+ Alert . appendToContainer ( new Alert ( 'Error: MP4 file not valid (It\'s not a GoPro File)' , Alert . ALERT_DANGER , 0 ) . toHTML ( ) ) ;
195199
196200 log . error ( this . ffmpegNoMap3 ) ;
197201 }
198202
203+ if ( ! this . ffmpegBreak && data . includes ( this . ffmpegCantOpen ) ) {
204+ this . ffmpegBreak = true ;
205+ Alert . appendToContainer ( new Alert ( data . split ( ']' ) [ 1 ] . split ( 'concat.txt' ) [ 0 ] , Alert . ALERT_DANGER , 0 ) . toHTML ( ) ) ;
206+
207+ log . error ( this . ffmpegCantOpen ) ;
208+ }
209+
199210 if ( this . ffmpegBreak ) {
200211 proc . kill ( ) ;
201212 Commons . resetStatus ( ) ;
202213 this . progressBar . color = ProgressBar . COLOR_RED ;
214+ this . projectSavePathBtn . removeAttribute ( 'disabled' ) ;
203215 } else {
204216 this . statusElem . innerText = 'Processing videos' ;
205217 this . statusElem . classList . add ( 'loading' ) ;
@@ -327,6 +339,7 @@ class VideoProcessor {
327339 this . statusElem . classList . add ( 'text-success' ) ;
328340 this . statusElem . classList . remove ( 'loading' ) ;
329341 this . selectFileBtn . removeAttribute ( 'disabled' ) ;
342+ this . projectSavePathBtn . removeAttribute ( 'disabled' ) ;
330343
331344 log . debug ( 'Finished and reloading latest projects' ) ;
332345 Commons . loadLatestProjects ( ) ;
0 commit comments