Skip to content

Commit

Permalink
Merge pull request #13491 from DaveTBlake/NavContainerFix
Browse files Browse the repository at this point in the history
[Music]Fix Container.Art for collaboration albums
  • Loading branch information
DaveTBlake committed Feb 11, 2018
2 parents 6e960a8 + 59dc6c4 commit 8e666fe
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions xbmc/music/windows/GUIWindowMusicBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1235,14 +1235,23 @@ bool CGUIWindowMusicBase::GetDirectory(const std::string &strDirectory, CFileIte
}
if (artfound)
{
std::string dirType = MediaTypeArtist;
if (params.GetAlbumId() > 0)
dirType = MediaTypeAlbum;
std::map<std::string, std::string> artmap;
for (auto artitem : art)
{
std::string artname;
artname = artitem.artType;
if (params.GetAlbumId() > 0 && artitem.mediaType != MediaTypeAlbum)
if (dirType == artitem.mediaType)
artname = artitem.artType;
else if (artitem.prefix.empty())
artname = artitem.mediaType + "." + artitem.artType;
artmap.insert(std::make_pair(artname, artitem.url));
else
{
if (dirType == MediaTypeAlbum)
StringUtils::Replace(artitem.prefix, "albumartist", "artist");
artname = artitem.prefix + "." + artitem.artType;
}
}
items.SetArt(artmap);
}
Expand Down

0 comments on commit 8e666fe

Please sign in to comment.