about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--crates/yt_dlp/src/lib.rs2
-rw-r--r--crates/yt_dlp/src/wrapper/info_json.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/yt_dlp/src/lib.rs b/crates/yt_dlp/src/lib.rs
index d9b10c2..7e11600 100644
--- a/crates/yt_dlp/src/lib.rs
+++ b/crates/yt_dlp/src/lib.rs
@@ -172,7 +172,7 @@ pub fn progress_hook<'a>(py: Python, input: Bound<'_, PyDict>) -> PyResult<()> {
             "vtt" => {
                 format!(
                     "Subtitles ({})",
-                    get! {is_string, as_str, "info_dict", "name"}
+                    default_get! {as_str, "<No Subtitle Language>", "info_dict", "name"}
                 )
             }
             title_extension @ ("webm" | "mp4" | "m4a") => {
diff --git a/crates/yt_dlp/src/wrapper/info_json.rs b/crates/yt_dlp/src/wrapper/info_json.rs
index 9c0d464..6597348 100644
--- a/crates/yt_dlp/src/wrapper/info_json.rs
+++ b/crates/yt_dlp/src/wrapper/info_json.rs
@@ -159,14 +159,14 @@ pub struct RequestedDownloads {
     pub acodec: String,
     pub aspect_ratio: f64,
     pub asr: u32,
-    pub audio_channels: u32,
+    pub audio_channels: Option<u32>,
     pub chapters: Option<Vec<SponsorblockChapter>>,
     pub duration: Option<f64>,
     pub dynamic_range: String,
     pub ext: String,
     pub filename: PathBuf,
     pub filepath: PathBuf,
-    pub filesize_approx: u64,
+    pub filesize_approx: Option<u64>,
     pub format: String,
     pub format_id: String,
     pub format_note: String,
@@ -188,7 +188,7 @@ pub struct RequestedDownloads {
 pub struct Subtitle {
     pub ext: SubtitleExt,
     pub filepath: PathBuf,
-    pub name: String,
+    pub name: Option<String>,
     pub url: Url,
 }