Skip to content

Commit

Permalink
don't set the 'thumb' art type if not found during video scan
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Marshall committed Oct 31, 2012
1 parent 87d9b2b commit 66e43a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions xbmc/guilib/GUIListItem.cpp
Expand Up @@ -119,11 +119,11 @@ void CGUIListItem::SetArt(const std::string &type, const std::string &url)
}
}

void CGUIListItem::SetArt(const ArtMap &art)
void CGUIListItem::SetArt(const ArtMap &art, bool setFallback /* = true */)
{
m_art = art;
// ensure that the fallback "thumb" is available
if (m_art.find("thumb") == m_art.end())
if (setFallback && m_art.find("thumb") == m_art.end())
{
if (HasArt("poster"))
m_art["thumb"] = m_art["poster"];
Expand Down
3 changes: 2 additions & 1 deletion xbmc/guilib/GUIListItem.h
Expand Up @@ -85,9 +85,10 @@ class CGUIListItem

/*! \brief set artwork for an item
\param art a type:url map for artwork
\param setFallback whether to set the "thumb" fallback, defaults to true.
\sa GetArt
*/
void SetArt(const ArtMap &art);
void SetArt(const ArtMap &art, bool setFallback = true);

/*! \brief append artwork to an item
\param art a type:url map for artwork
Expand Down
2 changes: 1 addition & 1 deletion xbmc/video/VideoInfoScanner.cpp
Expand Up @@ -1244,7 +1244,7 @@ namespace VIDEO
for (CGUIListItem::ArtMap::const_iterator i = art.begin(); i != art.end(); ++i)
CTextureCache::Get().BackgroundCacheImage(i->second);

pItem->SetArt(art);
pItem->SetArt(art, false); // don't set fallbacks

// parent folder to apply the thumb to and to search for local actor thumbs
CStdString parentDir = GetParentDir(*pItem);
Expand Down

0 comments on commit 66e43a3

Please sign in to comment.