// Look for embedded art
if (pItem->HasMusicInfoTag() && !pItem->GetMusicInfoTag()->GetCoverArtInfo().empty())
{
- CStdString thumb = CTextureCache::GetWrappedImageURL(pItem->GetPath(), "music");
- pItem->SetArt("thumb", thumb);
+ // The item has got embedded art but user thumbs overrule, so check for those first
+ if (!FillThumb(*pItem, false)) // Check for user thumbs but ignore folder thumbs
+ {
+ // No user thumb, use embedded art
+ CStdString thumb = CTextureCache::GetWrappedImageURL(pItem->GetPath(), "music");
+ pItem->SetArt("thumb", thumb);
+ }
}
else
{
- FillThumb(*pItem);
+ // Check for user thumbs
+ FillThumb(*pItem, true);
}
}
return true;
}
-bool CMusicThumbLoader::FillThumb(CFileItem &item)
+bool CMusicThumbLoader::FillThumb(CFileItem &item, bool folderThumbs /* = true */)
{
if (item.HasArt("thumb"))
return true;
CStdString thumb = GetCachedImage(item, "thumb");
if (thumb.IsEmpty())
{
- thumb = item.GetUserMusicThumb(false, true);
+ thumb = item.GetUserMusicThumb(false, folderThumbs);
if (!thumb.IsEmpty())
SetCachedImage(item, "thumb", thumb);
}
\param item the CFileItem object to fill
\return true if we fill the thumb, false otherwise
*/
- static bool FillThumb(CFileItem &item);
+ static bool FillThumb(CFileItem &item, bool folderThumbs = true);
static bool GetEmbeddedThumb(const std::string &path, MUSIC_INFO::EmbeddedArt &art);