Merge pull request #4406 from jmarshallnz/thumb_fixes
authorjmarshallnz <jcmarsha@gmail.com>
Thu, 13 Mar 2014 00:25:57 +0000 (13:25 +1300)
committerJonathan Marshall <jmarshall@xbmc.org>
Fri, 14 Mar 2014 21:48:09 +0000 (10:48 +1300)
Thumb fixes

xbmc/ThumbLoader.cpp
xbmc/music/MusicThumbLoader.cpp
xbmc/video/VideoThumbLoader.cpp

index 865b843..4aa7b2c 100644 (file)
@@ -103,13 +103,12 @@ bool CProgramThumbLoader::FillThumb(CFileItem &item)
 
   if (thumb.empty())
   { // see whether we have a cached image for this item
-    CProgramThumbLoader loader;
-    thumb = loader.GetCachedImage(item, "thumb");
+    thumb = GetCachedImage(item, "thumb");
     if (thumb.empty())
     {
       thumb = GetLocalThumb(item);
       if (!thumb.empty())
-        loader.SetCachedImage(item, "thumb", thumb);
+        SetCachedImage(item, "thumb", thumb);
     }
   }
 
index 7755b84..cb4039c 100644 (file)
@@ -184,7 +184,8 @@ bool CMusicThumbLoader::FillThumb(CFileItem &item, bool folderThumbs /* = true *
     if (!thumb.empty())
       SetCachedImage(item, "thumb", thumb);
   }
-  item.SetArt("thumb", thumb);
+  if (!thumb.empty())
+    item.SetArt("thumb", thumb);
   return !thumb.empty();
 }
 
index 7291eca..66eb7a9 100644 (file)
@@ -467,7 +467,8 @@ bool CVideoThumbLoader::FillThumb(CFileItem &item)
     if (!thumb.empty())
       SetCachedImage(item, "thumb", thumb);
   }
-  item.SetArt("thumb", thumb);
+  if (!thumb.empty())
+    item.SetArt("thumb", thumb);
   return !thumb.empty();
 }