Skip to content

Commit e25a990

Browse files
committed
Log output filename when render complete
1 parent dea7648 commit e25a990

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/main.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::data::{cli::Args, video::Encoding};
22
use clap::Parser;
3-
use data::song::{Song, Window};
3+
use data::song::{Song, SongError, Window};
44
use image::RgbImage;
55
use indicatif::{ProgressBar, ProgressStyle};
66
use lazy_static::lazy_static;
@@ -46,11 +46,16 @@ fn main() {
4646
// `err` can either be the end of the song, or a genuine fault.
4747
// Either way, stop execution.
4848
if result.is_err() {
49-
pb.finish_with_message(format!("{:?}", result.err().unwrap()));
49+
// Step 3: Flush MP4 to file
50+
encoding.flush();
51+
pb.finish();
52+
53+
match result.err().unwrap() {
54+
SongError::End => println!("Finished rendering to {}", &song.video_file_out),
55+
SongError::Error(err) => println!("{:?}", err),
56+
}
57+
5058
break;
5159
}
5260
}
53-
54-
// Step 3: Flush MP4 to file
55-
encoding.flush();
5661
}

0 commit comments

Comments
 (0)