M src/main.rs => src/main.rs +4 -1
@@ 171,7 171,10 @@ fn phase_two(phase_one_out_file: &str, mkv_info: &MkvInfo) {
"--edit".to_string(),
"info".to_string(),
"--set".to_string(),
- format!("title={}", mkv_info.title),
+ format!(
+ "title={}",
+ format!("{} ({})", mkv_info.title, mkv_info.year)
+ ),
];
for (number, name) in track_name_edits {
M src/mkvinfo.rs => src/mkvinfo.rs +6 -1
@@ 11,6 11,7 @@ use fancy_regex::Regex;
pub struct MkvInfo {
pub title: String,
+ pub year: usize,
pub file_name: String,
}
@@ 111,7 112,11 @@ impl MkvInfo {
.prompt()
.unwrap();
- MkvInfo { title, file_name }
+ MkvInfo {
+ title,
+ year,
+ file_name,
+ }
}
}