From 2e34abfc0ddbc54e0e9b752624029eb7167ffc64 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 4 May 2020 23:23:24 +0200 Subject: [PATCH] Fix mpris:artUrl when using embedded cover Fixes #426 --- src/core/mpris2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/mpris2.cpp b/src/core/mpris2.cpp index ff2f5b4f3..58e45c11f 100644 --- a/src/core/mpris2.cpp +++ b/src/core/mpris2.cpp @@ -396,13 +396,13 @@ void Mpris2::AlbumCoverLoaded(const Song &song, const AlbumCoverLoaderResult &re AddMetadata("mpris:trackid", current_track_id(), &last_metadata_); QUrl cover_url; - if (result.cover_url.isValid() && result.cover_url.isLocalFile()) { + if (result.cover_url.isValid() && result.cover_url.isLocalFile() && QFile(result.cover_url.toLocalFile()).exists()) { cover_url = result.cover_url; } else if (result.temp_cover_url.isValid() && result.temp_cover_url.isLocalFile()) { cover_url = result.temp_cover_url; } - if (cover_url.isValid()) AddMetadata("mpris:artUrl", result.cover_url.toString(), &last_metadata_); + if (cover_url.isValid()) AddMetadata("mpris:artUrl", cover_url.toString(), &last_metadata_); AddMetadata("year", song.year(), &last_metadata_); AddMetadata("bitrate", song.bitrate(), &last_metadata_);