summaryrefslogtreecommitdiffstats
path: root/options/options.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-11-05 12:51:43 -0600
committerDudemanguy <random342@airmail.cc>2023-12-08 18:14:06 +0000
commitce958b77424327a30a3026c226a1db72f26e3543 (patch)
tree89cdf473787eb1b43055e73db5ffbb86d7cdfb5f /options/options.c
parentb7d85f0d4a5330cb3f433cd0cb4c977e10a168f7 (diff)
downloadmpv-ce958b77424327a30a3026c226a1db72f26e3543.tar.bz2
mpv-ce958b77424327a30a3026c226a1db72f26e3543.tar.xz
filter_sdh: add --sub-filter-sdh-enclosures option
This filter is a bit complicated, but one of the essential parts of it is removing text enclosed by particular set of characters (e.g. text inbetween []). This was previously hardcoded to only take into account parenthesis and brackets, but people may want to filter more things so make this customizable. The option only takes "left hand characters" so the right pair is mapped internally if applicable. If not, then we just use the same character. Fixes #8268 since the unicode character in question can just be passed to this option.
Diffstat (limited to 'options/options.c')
-rw-r--r--options/options.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/options/options.c b/options/options.c
index be7d966a95..84f94c59b7 100644
--- a/options/options.c
+++ b/options/options.c
@@ -262,6 +262,7 @@ const struct m_sub_options mp_sub_filter_opts = {
.opts = (const struct m_option[]){
{"sub-filter-sdh", OPT_BOOL(sub_filter_SDH)},
{"sub-filter-sdh-harder", OPT_BOOL(sub_filter_SDH_harder)},
+ {"sub-filter-sdh-enclosures", OPT_STRING(sub_filter_SDH_enclosures)},
{"sub-filter-regex-enable", OPT_BOOL(rf_enable)},
{"sub-filter-regex-plain", OPT_BOOL(rf_plain)},
{"sub-filter-regex", OPT_STRINGLIST(rf_items)},
@@ -271,6 +272,7 @@ const struct m_sub_options mp_sub_filter_opts = {
},
.size = sizeof(OPT_BASE_STRUCT),
.defaults = &(OPT_BASE_STRUCT){
+ .sub_filter_SDH_enclosures = "([",
.rf_enable = true,
},
.change_flags = UPDATE_SUB_FILT,