fix: use unwrap default and add desc file arg

This commit is contained in:
LinlyBoi
2025-07-10 16:54:48 +03:00
parent 78f9763b93
commit 3695bb2425
2 changed files with 2 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut metadata = if let Some(metadata_path) = args.timestamp_file() { let mut metadata = if let Some(metadata_path) = args.timestamp_file() {
load_video_metadata(metadata_path)? load_video_metadata(metadata_path)?
} else { } else {
create_default_metadata(&video_files) create_default_metadata(&video_files, args.description_file())
}; };
// Generate schedule // Generate schedule

View File

@@ -270,7 +270,7 @@ pub fn create_default_metadata(video_files: &[String], description_file: String)
VideoMetadata { VideoMetadata {
title: format!("{}", filename), title: format!("{}", filename),
description: get_random_line(&expanded_path).unwrap(), description: get_random_line(&expanded_path).unwrap_or_default(),
tags: vec!["gaming".to_string()], tags: vec!["gaming".to_string()],
category_id: "20".to_string(), // GAMING category_id: "20".to_string(), // GAMING
privacy_status: "private".to_string(), privacy_status: "private".to_string(),