about summary refs log tree commit diff stats
path: root/crates
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-25 15:55:48 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-25 15:55:48 +0200
commit8e79f6c27128ce9ef7aed28ddb3cac59eca3e701 (patch)
tree53b96274a23f2b5eb3d4fcc8f1aedcf75eaa1918 /crates
parentfeat(cli): Support the common select -> download -> watch workflow (diff)
downloadyt-8e79f6c27128ce9ef7aed28ddb3cac59eca3e701.tar.gz
yt-8e79f6c27128ce9ef7aed28ddb3cac59eca3e701.zip
docs(yt_dlp/progress_hook): Add a note about the possibility to calculate video sizes
Diffstat (limited to 'crates')
-rw-r--r--crates/yt_dlp/src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/yt_dlp/src/lib.rs b/crates/yt_dlp/src/lib.rs
index 7e11600..b0dffa4 100644
--- a/crates/yt_dlp/src/lib.rs
+++ b/crates/yt_dlp/src/lib.rs
@@ -208,6 +208,13 @@ pub fn progress_hook<'a>(py: Python, input: Bound<'_, PyDict>) -> PyResult<()> {
                     estimate
                 } else {
                     total_bytes
+                    // FIXME: The solution below _would_ work, if we had a info_json with the
+                    // values. <2024-08-24>
+                    //
+                    // let duration = default_get! {as_f64, 0.0, "duration"}.ceil() as u64;
+                    // // TODO: yt_dlp gets this from the format
+                    // let tbr = default_get! {as_f64, 0.0, "tbr"}.ceil() as u64;
+                    // duration * tbr * (1000 / 8)
                 }
             };
             let percent: f64 = {