Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[art] use artist.fanart for artist fanart, and add fallbacks for fana…

…rt->artist.fanart and thumb->album.thumb for albums/songs
  • Loading branch information...
commit bd8a472bb17b0d0d986cd9e9b99f95647323e9a9 1 parent 93a2523
Jonathan Marshall authored
Showing with 12 additions and 2 deletions.
  1. +12 −2 xbmc/music/MusicThumbLoader.cpp
View
14 xbmc/music/MusicThumbLoader.cpp
@@ -80,7 +80,10 @@ bool CMusicThumbLoader::LoadItem(CFileItem* pItem)
{
string fanart = m_database->GetArtForItem(idArtist, "artist", "fanart");
if (!fanart.empty())
- pItem->SetArt("fanart", fanart);
+ {
+ pItem->SetArt("artist.fanart", fanart);
+ pItem->SetArtFallback("fanart", "artist.fanart");
+ }
}
m_database->Close();
}
@@ -127,11 +130,18 @@ bool CMusicThumbLoader::FillLibraryArt(CFileItem &item)
if (i != m_albumArt.end())
{
item.AppendArt(i->second, "album");
+ for (map<string, string>::const_iterator j = i->second.begin(); j != i->second.end(); ++j)
+ item.SetArtFallback(j->first, "album." + j->first);
}
}
if (tag.GetType() == "song" || tag.GetType() == "album")
{ // fanart from the artist
- item.SetArt("fanart", m_database->GetArtistArtForItem(tag.GetDatabaseId(), tag.GetType(), "fanart"));
+ string fanart = m_database->GetArtistArtForItem(tag.GetDatabaseId(), tag.GetType(), "fanart");
+ if (!fanart.empty())
+ {
+ item.SetArt("artist.fanart", fanart);
+ item.SetArtFallback("fanart", "artist.fanart");
+ }
}
m_database->Close();
}
Please sign in to comment.
Something went wrong with that request. Please try again.