From 9d2a6dc302a3c2ed7320b66793f4ac03c2b5ce80 Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Fri, 3 Dec 2021 16:52:53 +0100 Subject: player: add cover-art-whitelist option This allows more fine grained control over which cover art to load. With --cover-art-auto=exact and --cover-art-whitelist=yes, you can now load cover art with the exact media filename and the whitelisted filenames, but not cover art that contains the media filename (--cover-art-auto=fuzzy). --- options/options.c | 2 ++ options/options.h | 1 + 2 files changed, 3 insertions(+) (limited to 'options') diff --git a/options/options.c b/options/options.c index e996eb8026..650ba00b46 100644 --- a/options/options.c +++ b/options/options.c @@ -611,6 +611,7 @@ static const m_option_t mp_opts[] = { {"no", -1}, {"exact", 0}, {"fuzzy", 1}, {"all", 2})}, {"cover-art-auto", OPT_CHOICE(coverart_auto, {"no", -1}, {"exact", 0}, {"fuzzy", 1}, {"all", 2})}, + {"cover-art-whitelist", OPT_BOOL(coverart_whitelist)}, {"", OPT_SUBSTRUCT(subs_rend, mp_subtitle_sub_opts)}, {"", OPT_SUBSTRUCT(subs_filt, mp_sub_filter_opts)}, @@ -1033,6 +1034,7 @@ static const struct MPOpts mp_default_opts = { .sub_auto = 0, .audiofile_auto = -1, .coverart_auto = 1, + .coverart_whitelist = true, .osd_bar_visible = 1, .screenshot_template = "mpv-shot%n", .play_dir = 1, diff --git a/options/options.h b/options/options.h index b32dc06519..4eb5ef07c7 100644 --- a/options/options.h +++ b/options/options.h @@ -306,6 +306,7 @@ typedef struct MPOpts { int sub_auto; int audiofile_auto; int coverart_auto; + bool coverart_whitelist; int osd_bar_visible; int w32_priority; -- cgit v1.2.3