fix: use unwrap default and add desc file arg
This commit is contained in:
@@ -36,7 +36,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut metadata = if let Some(metadata_path) = args.timestamp_file() {
|
||||
load_video_metadata(metadata_path)?
|
||||
} else {
|
||||
create_default_metadata(&video_files)
|
||||
create_default_metadata(&video_files, args.description_file())
|
||||
};
|
||||
|
||||
// Generate schedule
|
||||
|
||||
@@ -270,7 +270,7 @@ pub fn create_default_metadata(video_files: &[String], description_file: String)
|
||||
|
||||
VideoMetadata {
|
||||
title: format!("{}", filename),
|
||||
description: get_random_line(&expanded_path).unwrap(),
|
||||
description: get_random_line(&expanded_path).unwrap_or_default(),
|
||||
tags: vec!["gaming".to_string()],
|
||||
category_id: "20".to_string(), // GAMING
|
||||
privacy_status: "private".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user