diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-11-07 14:50:54 +0100 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-11-07 14:50:54 +0100 |
| commit | a0a8778eaa4f50e9c612a8d370912ccfd325c2ac (patch) | |
| tree | 067a40620829450d2909f189348641d31508684a /crates/yt_dlp/src/options.rs | |
| parent | fix(yt_dlp/pp/dearrow): Actually make the API calls as intended (diff) | |
| download | yt-a0a8778eaa4f50e9c612a8d370912ccfd325c2ac.zip | |
refactor(yt_dlp/): Make the options more like the builder pattern
Diffstat (limited to 'crates/yt_dlp/src/options.rs')
| -rw-r--r-- | crates/yt_dlp/src/options.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/yt_dlp/src/options.rs b/crates/yt_dlp/src/options.rs index e3373b2..602ac69 100644 --- a/crates/yt_dlp/src/options.rs +++ b/crates/yt_dlp/src/options.rs @@ -47,7 +47,7 @@ impl YoutubeDLOptions { post_processors: vec![], }; - me.with_post_processor(post_processors::dearrow::process) + me.add_post_processor(post_processors::dearrow::process) } #[must_use] @@ -82,7 +82,7 @@ impl YoutubeDLOptions { } #[must_use] - pub fn with_post_processor(mut self, pp: PostProcessorFunction) -> Self { + pub fn add_post_processor(mut self, pp: PostProcessorFunction) -> Self { self.post_processors.push(pp); self } @@ -119,8 +119,6 @@ impl YoutubeDL { pub fn from_options(options: YoutubeDLOptions) -> Result<Self, build::Error> { Python::initialize(); - let output_options = options.options.clone(); - let yt_dlp_module = Python::attach(|py| { let opts = json_loads(options.options, py); @@ -226,7 +224,6 @@ signal.signal(signal.SIGINT, signal.SIG_DFL) Ok(Self { inner: yt_dlp_module, - options: output_options, }) } } |
