From 33e61f9eb8123ff958867aef4efb66bf5f0dfd0d Mon Sep 17 00:00:00 2001 From: David Sansome Date: Sun, 16 May 2010 22:31:59 +0000 Subject: [PATCH] Fix last.fm cover art --- src/widgets/osd.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/widgets/osd.cpp b/src/widgets/osd.cpp index 0842b4487..0c800a875 100644 --- a/src/widgets/osd.cpp +++ b/src/widgets/osd.cpp @@ -89,7 +89,12 @@ void OSD::SongChanged(const Song &song) { waiting.summary = summary; waiting.message = message_parts.join(", "); - if (show_art_) { + if (show_art_ && !song.image().isNull()) { + // The song has embedded art, so use that + AlbumArtLoaded(waiting, song.image()); + } else if (show_art_) { + // Load the art in a background thread (maybe from a remote server), + // AlbumArtLoaded gets called when it's ready. quint64 id = cover_loader_->Worker()->LoadImageAsync( song.art_automatic(), song.art_manual()); waiting_for_album_art_.insert(id, waiting);