Skip to content

Commit

Permalink
fixed: show the actual set poster/fanart for sets
Browse files Browse the repository at this point in the history
only show relevant art types in the Choose art dialog
  • Loading branch information
notspiff committed Jan 18, 2018
1 parent b6e0913 commit fdda97d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
15 changes: 14 additions & 1 deletion xbmc/video/VideoThumbLoader.cpp
Expand Up @@ -242,11 +242,16 @@ std::vector<std::string> CVideoThumbLoader::GetArtTypes(const std::string &type)
ret.push_back("poster");
ret.push_back("fanart");
}
else if (type == MediaTypeMovie || type == MediaTypeMusicVideo || type == MediaTypeVideoCollection)
else if (type == MediaTypeMovie || type == MediaTypeMusicVideo)
{
ret.push_back("poster");
ret.push_back("fanart");
}
else if (type == MediaTypeVideoCollection)
{
ret.push_back("set");
ret.push_back("setfanart");
}
else if (type.empty()) // unknown - just throw everything in
{
ret.push_back("poster");
Expand Down Expand Up @@ -512,6 +517,14 @@ bool CVideoThumbLoader::FillLibraryArt(CFileItem &item)
item.AppendArt(i->second, MediaTypeSeason);
}
}

if (tag.m_type == MediaTypeVideoCollection)
{
if (item.HasArt("set"))
item.SetArt("poster", item.GetArt("set"));
if (item.HasArt("setfanart"))
item.SetArt("fanart", item.GetArt("setfanart"));
}
m_videoDatabase->Close();
}
return !item.GetArt().empty();
Expand Down
11 changes: 9 additions & 2 deletions xbmc/video/dialogs/GUIDialogVideoInfo.cpp
Expand Up @@ -661,12 +661,19 @@ std::string CGUIDialogVideoInfo::ChooseArtType(const CFileItem &videoItem, std::
for (std::vector<std::string>::const_iterator i = artTypes.begin(); i != artTypes.end(); ++i)
{
std::string type = *i;
if (videoItem.GetVideoInfoTag()->m_type == MediaTypeVideoCollection &&
!StringUtils::StartsWith(type, "set"))
continue;
else if (videoItem.GetVideoInfoTag()->m_type != MediaTypeVideoCollection &&
StringUtils::StartsWith(type, "set"))
continue;

CFileItemPtr item(new CFileItem(type, false));
if (type == "banner")
item->SetLabel(g_localizeStrings.Get(20020));
else if (type == "fanart")
else if (type == "fanart" || type == "setfanart")
item->SetLabel(g_localizeStrings.Get(20445));
else if (type == "poster")
else if (type == "poster" || type == "set")
item->SetLabel(g_localizeStrings.Get(20021));
else if (type == "thumb")
item->SetLabel(g_localizeStrings.Get(21371));
Expand Down

0 comments on commit fdda97d

Please sign in to comment.