about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-24 11:40:48 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-24 11:45:34 +0200
commit82285c86bf811c642b4593bc9a28633e92feceb4 (patch)
tree5287ae09964deda4ab62eb94a55b7261fc884d77 /src
parentfix(select/display): Only align the status commands in color_display (diff)
downloadyt-82285c86bf811c642b4593bc9a28633e92feceb4.tar.gz
yt-82285c86bf811c642b4593bc9a28633e92feceb4.zip
fix(download): Don't fail hard, when a video file size can't be approximated
Diffstat (limited to 'src')
-rw-r--r--src/download/mod.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/download/mod.rs b/src/download/mod.rs
index 2a19a3a..d1de3ff 100644
--- a/src/download/mod.rs
+++ b/src/download/mod.rs
@@ -183,7 +183,12 @@ impl Downloader {
             } else if let Some(val) = result.filesize_approx {
                 val
             } else {
-                bail!("Failed to find a filesize for video: '{}'", video.title);
+                let hardcoded_default = Bytes::from_str("250 MiB").expect("This is hardcoded");
+                error!(
+                    "Failed to find a filesize for video: '{}' (Using hardcoded value of {})",
+                    video.title, hardcoded_default
+                );
+                hardcoded_default.as_u64()
             };
 
             assert_eq!(