don't set the 'thumb' art type if not found during video scan
authorJonathan Marshall <jmarshall@never.you.mind>
Sun, 28 Oct 2012 07:15:02 +0000 (20:15 +1300)
committerJonathan Marshall <jmarshall@never.you.mind>
Wed, 31 Oct 2012 21:42:55 +0000 (10:42 +1300)
xbmc/guilib/GUIListItem.cpp
xbmc/guilib/GUIListItem.h
xbmc/video/VideoInfoScanner.cpp

index 6646cae..8d7c925 100644 (file)
@@ -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"];
index 36f571b..b9d2628 100644 (file)
@@ -85,9 +85,10 @@ public:
 
   /*! \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
index 6bef027..7ea3787 100644 (file)
@@ -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);