From 43c7934af75867cb6132f3f3844c8022245efd80 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 10 Dec 2022 23:22:46 +0100 Subject: [PATCH] Mpris2: Use art manual or automatic directly when available Fixes #1079 --- src/core/mpris2.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/mpris2.cpp b/src/core/mpris2.cpp index aaf4b0ad7..c5afa389a 100644 --- a/src/core/mpris2.cpp +++ b/src/core/mpris2.cpp @@ -401,6 +401,13 @@ void Mpris2::AlbumCoverLoaded(const Song &song, const AlbumCoverLoaderResult &re else if (result.temp_cover_url.isValid() && result.temp_cover_url.isLocalFile()) { cover_url = result.temp_cover_url; } + else if (song.art_manual().isValid() && song.art_manual().isLocalFile() && song.art_manual().path() != Song::kManuallyUnsetCover && song.art_manual().path() != Song::kEmbeddedCover) { + cover_url = song.art_manual(); + } + else if (song.art_automatic().isValid() && song.art_automatic().isLocalFile() && song.art_automatic().path() != Song::kManuallyUnsetCover && song.art_automatic().path() != Song::kEmbeddedCover) { + cover_url = song.art_automatic(); + } + if (cover_url.isValid()) AddMetadata("mpris:artUrl", cover_url.toString(), &last_metadata_); AddMetadata("year", song.year(), &last_metadata_);