about summary refs log tree commit diff stats
path: root/crates/yt_dlp/src/progress_hook.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-06-17 08:56:36 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-06-17 08:56:36 +0200
commit1a6d3639e6fddb731735554d407d1eea77f053c6 (patch)
tree7e42b8d65c283c4cf6b756901dcfccf7c0f6db94 /crates/yt_dlp/src/progress_hook.rs
parentfix(yt_dlp/post_processors/dearrow): Migrate to curl for api requests (diff)
downloadyt-1a6d3639e6fddb731735554d407d1eea77f053c6.zip
fix(yt_dlp/post_processors): Register in python
We need to tell yt_dlp about our post processors, as they would
otherwise not take full effect. For example, changing the title would
previously only have changed the title in the *in-memory* info json, the
actual file on disk (video and .info.json) would still have the old
title, as yt_dlp did not know about our post processor.

Registering it via their api also has the upside of being able to
determine when to run.
Diffstat (limited to 'crates/yt_dlp/src/progress_hook.rs')
-rw-r--r--crates/yt_dlp/src/progress_hook.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/yt_dlp/src/progress_hook.rs b/crates/yt_dlp/src/progress_hook.rs
index 43f85e0..4604223 100644
--- a/crates/yt_dlp/src/progress_hook.rs
+++ b/crates/yt_dlp/src/progress_hook.rs
@@ -49,3 +49,7 @@ macro_rules! mk_python_function {
 }
 
 pub use rustpython;
+pub mod __priv {
+    pub use crate::{json_dumps, json_loads};
+    pub use rustpython::vm;
+}