diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-24 11:40:48 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-24 11:45:34 +0200 |
commit | 82285c86bf811c642b4593bc9a28633e92feceb4 (patch) | |
tree | 5287ae09964deda4ab62eb94a55b7261fc884d77 | |
parent | fix(select/display): Only align the status commands in color_display (diff) | |
download | yt-82285c86bf811c642b4593bc9a28633e92feceb4.tar.gz yt-82285c86bf811c642b4593bc9a28633e92feceb4.zip |
fix(download): Don't fail hard, when a video file size can't be approximated
-rw-r--r-- | src/download/mod.rs | 7 |
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!( |