aboutsummaryrefslogtreecommitdiffstats
path: root/crates/yt_dlp/src/options.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-11-07 18:25:55 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-11-07 18:25:55 +0100
commit936002297daabce66ff48a2dd4dcf673191e5694 (patch)
tree84d2480302233419f5efbe8a685fbf09652eda37 /crates/yt_dlp/src/options.rs
parentrefactor({yt/cmds/{download,select},colors/custom}): Remove clippy warnings (diff)
downloadyt-936002297daabce66ff48a2dd4dcf673191e5694.zip
fix({yt/yt_dlp/match_filters,yt_dlp/options}): Make match_filters actually work
Diffstat (limited to 'crates/yt_dlp/src/options.rs')
-rw-r--r--crates/yt_dlp/src/options.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/yt_dlp/src/options.rs b/crates/yt_dlp/src/options.rs
index cdbdb45..5fdcb18 100644
--- a/crates/yt_dlp/src/options.rs
+++ b/crates/yt_dlp/src/options.rs
@@ -12,7 +12,7 @@ use std::sync;
use pyo3::{
Bound, IntoPyObjectExt, PyAny, PyResult, Python, intern,
- types::{PyAnyMethods, PyCFunction, PyDict, PyList, PyTuple},
+ types::{PyAnyMethods, PyCFunction, PyDict, PyTuple},
};
use pyo3_pylogger::setup_logging;
@@ -159,13 +159,13 @@ signal.signal(signal.SIGINT, signal.SIG_DFL)
});
}
- {
+ if !options.match_filters.is_empty() {
// TODO: Make this work with more than one match filter. <2026-11-07>
assert_eq!(options.match_filters.len(), 1);
opts.set_item(
intern!(py, "match_filter"),
- pp(py)
+ options.match_filters[0](py)
.wrap_exc(py, "convertion match filter function to python")?
.into_bound_py_any(py)
.wrap_exc(py, "converting match filter function to any type")?,