From eef281e89eff6e21a67a106d27fd38979ad20752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= Date: Sun, 7 Mar 2021 23:53:19 +0200 Subject: player/{core,loadfile}: make cover art loading more explicit Now loading cover art through mp_add_external_file requires an additional argument to be set to true. This way not all video-add commands end up being marked as cover art when they move through mp_add_external_file, as originally changed in 55d7f9ded197d82d172b7baf74b1a07640361ae8 . Additionally, this lets us clean up some logic that would otherwise be duplicated between open_external_files and autoload_external_files, if the logic had been kept split from mp_add_external_file. Fixes #8358 --- player/core.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'player/core.h') diff --git a/player/core.h b/player/core.h index f2f0a15a00..fcb513bed1 100644 --- a/player/core.h +++ b/player/core.h @@ -528,7 +528,8 @@ void mp_abort_trigger_locked(struct MPContext *mpctx, struct mp_abort_entry *abort); void uninit_player(struct MPContext *mpctx, unsigned int mask); int mp_add_external_file(struct MPContext *mpctx, char *filename, - enum stream_type filter, struct mp_cancel *cancel); + enum stream_type filter, struct mp_cancel *cancel, + bool cover_art); void mark_track_selection(struct MPContext *mpctx, int order, enum stream_type type, int value); #define FLAG_MARK_SELECTION 1 -- cgit v1.2.3