From 3f0e8bd506e3e3fc6eb9927f0b2d04b23e9105a2 Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Wed, 28 Jul 2021 17:00:38 +0200 Subject: options: audio-display determines cover priority Let audio-display determine whether embedded images or external cover art tracks should be selected when both are present. Attached pictures are given priority by default as requested in #8539. Also updates references to attached pictures in the log and manpage to refer to cover art as well. Closes #8539. --- player/loadfile.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'player') diff --git a/player/loadfile.c b/player/loadfile.c index e992df694f..3c0415aed6 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -476,8 +476,12 @@ static bool compare_track(struct track *t1, struct track *t2, char **langs, return !t1->is_external; bool ext1 = t1->is_external && !t1->no_default; bool ext2 = t2->is_external && !t2->no_default; - if (ext1 != ext2) + if (ext1 != ext2) { + if (t1->attached_picture && t2->attached_picture + && opts->audio_display == 1) + return !ext1; return ext1; + } if (t1->auto_loaded != t2->auto_loaded) return !t1->auto_loaded; int l1 = match_lang(langs, t1->lang), l2 = match_lang(langs, t2->lang); @@ -1619,7 +1623,7 @@ static void play_current_file(struct MPContext *mpctx) if (mpctx->vo_chain && mpctx->vo_chain->is_coverart) { MP_INFO(mpctx, - "Displaying attached picture. Use --no-audio-display to prevent this.\n"); + "Displaying cover art. Use --no-audio-display to prevent this.\n"); } if (!mpctx->vo_chain) -- cgit v1.2.3