Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[cleanup] remove old thumb caching code as no longer used

  • Loading branch information...
commit 3ae889107a2afe40fa1c396e4531738ddd6df70e 1 parent 7e0a095
authored June 30, 2012
183  xbmc/FileItem.cpp
@@ -55,7 +55,6 @@
55 55
 #include "utils/log.h"
56 56
 #include "utils/Variant.h"
57 57
 #include "music/karaoke/karaokelyricsfactory.h"
58  
-#include "ThumbnailCache.h"
59 58
 #include "utils/Mime.h"
60 59
 #include "utils/CharsetConverter.h"
61 60
 
@@ -1008,31 +1007,6 @@ void CFileItem::FillInDefaultIcon()
1008 1007
   }
1009 1008
 }
1010 1009
 
1011  
-CStdString CFileItem::GetCachedArtistThumb() const
1012  
-{
1013  
-  return CThumbnailCache::GetArtistThumb(*this);
1014  
-}
1015  
-
1016  
-void CFileItem::SetCachedArtistThumb()
1017  
-{
1018  
-  CStdString thumb(GetCachedArtistThumb());
1019  
-  if (CFile::Exists(thumb))
1020  
-  {
1021  
-    // found it, we are finished.
1022  
-    SetThumbnailImage(thumb);
1023  
-  }
1024  
-}
1025  
-
1026  
-// set the album thumb for a file or folder
1027  
-void CFileItem::SetMusicThumb(bool alwaysCheckRemote /* = true */)
1028  
-{
1029  
-  if (HasThumbnail()) return;
1030  
-
1031  
-  SetCachedMusicThumb();
1032  
-  if (!HasThumbnail())
1033  
-    SetUserMusicThumb(alwaysCheckRemote);
1034  
-}
1035  
-
1036 1010
 void CFileItem::RemoveExtension()
1037 1011
 {
1038 1012
   if (m_bIsFolder)
@@ -1824,21 +1798,6 @@ void CFileItemList::FillInDefaultIcons()
1824 1798
   }
1825 1799
 }
1826 1800
 
1827  
-void CFileItemList::SetMusicThumbs()
1828  
-{
1829  
-  CSingleLock lock(m_lock);
1830  
-  //cache thumbnails directory
1831  
-  g_directoryCache.InitMusicThumbCache();
1832  
-
1833  
-  for (int i = 0; i < (int)m_items.size(); ++i)
1834  
-  {
1835  
-    CFileItemPtr pItem = m_items[i];
1836  
-    pItem->SetMusicThumb();
1837  
-  }
1838  
-
1839  
-  g_directoryCache.ClearMusicThumbCache();
1840  
-}
1841  
-
1842 1801
 int CFileItemList::GetFolderCount() const
1843 1802
 {
1844 1803
   CSingleLock lock(m_lock);
@@ -2441,84 +2400,6 @@ bool CFileItemList::AlwaysCache() const
2441 2400
   return false;
2442 2401
 }
2443 2402
 
2444  
-void CFileItemList::SetCachedMusicThumbs()
2445  
-{
2446  
-  CSingleLock lock(m_lock);
2447  
-  // TODO: Investigate caching time to see if it speeds things up
2448  
-  for (unsigned int i = 0; i < m_items.size(); ++i)
2449  
-  {
2450  
-    CFileItemPtr pItem = m_items[i];
2451  
-    pItem->SetCachedMusicThumb();
2452  
-  }
2453  
-}
2454  
-
2455  
-void CFileItem::SetCachedMusicThumb()
2456  
-{
2457  
-  // if it already has a thumbnail, then return
2458  
-  if (HasThumbnail() || m_bIsShareOrDrive) return ;
2459  
-
2460  
-  // streams do not have thumbnails
2461  
-  if (IsInternetStream()) return ;
2462  
-
2463  
-  //  music db items already have thumbs or there is no thumb available
2464  
-  if (IsMusicDb()) return;
2465  
-
2466  
-  // ignore the parent dir items
2467  
-  if (IsParentFolder()) return;
2468  
-
2469  
-  CStdString cachedThumb(GetPreviouslyCachedMusicThumb());
2470  
-  if (!cachedThumb.IsEmpty())
2471  
-    SetThumbnailImage(cachedThumb);
2472  
-    // SetIconImage(cachedThumb);
2473  
-}
2474  
-
2475  
-CStdString CFileItem::GetPreviouslyCachedMusicThumb() const
2476  
-{
2477  
-  // look if an album thumb is available,
2478  
-  // could be any file with tags loaded or
2479  
-  // a directory in album window
2480  
-  CStdString strAlbum, strArtist;
2481  
-  if (HasMusicInfoTag() && m_musicInfoTag->Loaded())
2482  
-  {
2483  
-    strAlbum = m_musicInfoTag->GetAlbum();
2484  
-    if (!m_musicInfoTag->GetAlbumArtist().empty())
2485  
-      strArtist = StringUtils::Join(m_musicInfoTag->GetAlbumArtist(), g_advancedSettings.m_musicItemSeparator);
2486  
-    else
2487  
-      strArtist = StringUtils::Join(m_musicInfoTag->GetArtist(), g_advancedSettings.m_musicItemSeparator);
2488  
-  }
2489  
-  if (!strAlbum.IsEmpty() && !strArtist.IsEmpty())
2490  
-  {
2491  
-    // try permanent album thumb using "album name + artist name"
2492  
-    CStdString thumb(CThumbnailCache::GetAlbumThumb(strAlbum, strArtist));
2493  
-    if (CFile::Exists(thumb))
2494  
-      return thumb;
2495  
-  }
2496  
-
2497  
-  // if a file, try to find a cached filename.tbn
2498  
-  if (!m_bIsFolder)
2499  
-  {
2500  
-    // look for locally cached tbn
2501  
-    CStdString thumb(CThumbnailCache::GetMusicThumb(m_strPath));
2502  
-    if (CFile::Exists(thumb))
2503  
-      return thumb;
2504  
-  }
2505  
-
2506  
-  // try and find a cached folder thumb (folder.jpg or folder.tbn)
2507  
-  CStdString strPath;
2508  
-  if (!m_bIsFolder)
2509  
-    URIUtils::GetDirectory(m_strPath, strPath);
2510  
-  else
2511  
-    strPath = m_strPath;
2512  
-  // music thumbs are cached without slash at end
2513  
-  URIUtils::RemoveSlashAtEnd(strPath);
2514  
-
2515  
-  CStdString thumb(CThumbnailCache::GetMusicThumb(strPath));
2516  
-  if (CFile::Exists(thumb))
2517  
-    return thumb;
2518  
-
2519  
-  return "";
2520  
-}
2521  
-
2522 2403
 CStdString CFileItem::GetUserMusicThumb(bool alwaysCheckRemote /* = false */) const
2523 2404
 {
2524 2405
   if (m_strPath.IsEmpty()
@@ -2555,19 +2436,6 @@ CStdString CFileItem::GetUserMusicThumb(bool alwaysCheckRemote /* = false */) co
2555 2436
   return "";
2556 2437
 }
2557 2438
 
2558  
-void CFileItem::SetUserMusicThumb(bool alwaysCheckRemote /* = false */)
2559  
-{
2560  
-  // caches as the local thumb
2561  
-  CStdString thumb(GetUserMusicThumb(alwaysCheckRemote));
2562  
-  if (!thumb.IsEmpty())
2563  
-  {
2564  
-    CStdString cachedThumb(CThumbnailCache::GetMusicThumb(m_strPath));
2565  
-    CPicture::CreateThumbnail(thumb, cachedThumb);
2566  
-  }
2567  
-
2568  
-  SetCachedMusicThumb();
2569  
-}
2570  
-
2571 2439
 // Gets the .tbn filename from a file or folder name.
2572 2440
 // <filename>.ext -> <filename>.tbn
2573 2441
 // <foldername>/ -> <foldername>.tbn
@@ -2781,20 +2649,6 @@ bool CFileItem::testGetBaseMoviePath()
2781 2649
 }
2782 2650
 #endif
2783 2651
 
2784  
-bool CFileItem::CacheLocalFanart() const
2785  
-{
2786  
-  // first check for an already cached fanart image
2787  
-  CStdString cachedFanart(GetCachedFanart());
2788  
-  if (CFile::Exists(cachedFanart))
2789  
-    return true;
2790  
-
2791  
-  // we don't have a cached image, so let's see if the user has a local image, and cache it if so
2792  
-  CStdString localFanart(GetLocalFanart());
2793  
-  if (!localFanart.IsEmpty())
2794  
-    return CPicture::CacheFanart(localFanart, cachedFanart);
2795  
-  return false;
2796  
-}
2797  
-
2798 2652
 CStdString CFileItem::GetLocalFanart() const
2799 2653
 {
2800 2654
   if (IsVideoDb())
@@ -2895,43 +2749,6 @@ CStdString CFileItem::GetLocalMetadataPath() const
2895 2749
   return parent;
2896 2750
 }
2897 2751
 
2898  
-CStdString CFileItem::GetCachedFanart() const
2899  
-{
2900  
-  return CThumbnailCache::GetFanart(*this);
2901  
-}
2902  
-
2903  
-CStdString CFileItem::GetCachedThumb(const CStdString &path, const CStdString &path2, bool split)
2904  
-{
2905  
-  return CThumbnailCache::GetThumb(path, path2, split);
2906  
-}
2907  
-
2908  
-/*void CFileItem::SetThumb()
2909  
-{
2910  
-  // we need to know the type of file at this point
2911  
-  // as differing views have differing inheritance rules for thumbs:
2912  
-
2913  
-  // Videos:
2914  
-  // Folders only use <foldername>/folder.jpg or <foldername>.tbn
2915  
-  // Files use <filename>.tbn
2916  
-  //  * Thumbs are cached from here using file or folder path
2917  
-
2918  
-  // Music:
2919  
-  // Folders only use <foldername>/folder.jpg or <foldername>.tbn
2920  
-  // Files use <filename>.tbn or the album/path cached thumb or inherit from the folder
2921  
-  //  * Thumbs are cached from here using file or folder path
2922  
-
2923  
-  // Programs:
2924  
-  // Folders only use <foldername>/folder.jpg or <foldername>.tbn
2925  
-  // Files use <filename>.tbn or the embedded xbe.  Shortcuts have the additional step of the <thumbnail> tag to check
2926  
-  //  * Thumbs are cached from here using file or folder path
2927  
-
2928  
-  // Pictures:
2929  
-  // Folders use <foldername>/folder.jpg or <foldername>.tbn, or auto-generated from 4 images in the folder
2930  
-  // Files use <filename>.tbn or a resized version of the picture
2931  
-  //  * Thumbs are cached from here using file or folder path
2932  
-
2933  
-}*/
2934  
-
2935 2752
 bool CFileItem::LoadMusicTag()
2936 2753
 {
2937 2754
   // not audio
33  xbmc/FileItem.h
@@ -153,7 +153,6 @@ class CFileItem :
153 153
   void RemoveExtension();
154 154
   void CleanString();
155 155
   void FillInDefaultIcon();
156  
-  void SetMusicThumb(bool alwaysCheckRemote = false);
157 156
   void SetFileSizeLabel();
158 157
   virtual void SetLabel(const CStdString &strLabel);
159 158
   CURL GetAsUrl() const;
@@ -200,33 +199,13 @@ class CFileItem :
200 199
 
201 200
   CPictureInfoTag* GetPictureInfoTag();
202 201
 
203  
-  // Gets the cached thumb filename (no existence checks)
204  
-  CStdString GetCachedArtistThumb() const;
205  
-  /*!
206  
-   \brief Get the cached fanart path for this item if it exists
207  
-   \return path to the cached fanart for this item, or empty if none exists
208  
-   \sa CacheLocalFanart, GetLocalFanart
209  
-   */
210  
-  CStdString GetCachedFanart() const;
211  
-  static CStdString GetCachedThumb(const CStdString &path, const CStdString& strPath2, bool split=false);
212  
-
213  
-  /*!
214  
-   \brief Cache a copy of the local fanart for this item if we don't already have an image cached
215  
-   \return true if we already have cached fanart or if the caching was successful, false if no image is cached.
216  
-   \sa GetLocalFanart, GetCachedFanart
217  
-   */
218  
-  bool CacheLocalFanart() const;
219 202
   /*!
220 203
    \brief Get the local fanart for this item if it exists
221 204
    \return path to the local fanart for this item, or empty if none exists
222  
-   \sa CacheLocalFanart, GetCachedFanart
  205
+   \sa GetFolderThumb, GetTBNFile
223 206
    */
224 207
   CStdString GetLocalFanart() const;
225 208
 
226  
-  // Sets the cached thumb for the item if it exists
227  
-  void SetCachedArtistThumb();
228  
-  void SetCachedMusicThumb();
229  
-
230 209
   // Gets the .tbn file associated with this item
231 210
   CStdString GetTBNFile() const;
232 211
   // Gets the folder image associated with this item (defaults to folder.jpg)
@@ -251,9 +230,6 @@ class CFileItem :
251 230
   CStdString GetUserVideoThumb() const;
252 231
   CStdString GetUserMusicThumb(bool alwaysCheckRemote = false) const;
253 232
 
254  
-  // Caches the user thumb and assigns it to the item
255  
-  void SetUserMusicThumb(bool alwaysCheckRemote = false);
256  
-
257 233
   /*! \brief Get the path where we expect local metadata to reside.
258 234
    For a folder, this is just the existing path (eg tvshow folder)
259 235
    For a file, this is the parent path, with exceptions made for VIDEO_TS and BDMV files
@@ -296,11 +272,7 @@ class CFileItem :
296 272
   bool IsSamePath(const CFileItem *item) const;
297 273
 
298 274
   bool IsAlbum() const;
299  
-private:
300  
-  // Gets the previously cached thumb file (with existence checks)
301  
-  CStdString GetPreviouslyCachedMusicThumb() const;
302 275
 
303  
-public:
304 276
   bool m_bIsShareOrDrive;    ///< is this a root share/drive
305 277
   int m_iDriveType;     ///< If \e m_bIsShareOrDrive is \e true, use to get the share type. Types see: CMediaSource::m_iDriveType
306 278
   CDateTime m_dateTime;             ///< file creation date & time
@@ -405,7 +377,6 @@ class CFileItemList : public CFileItem
405 377
   void Reserve(int iCount);
406 378
   void Sort(SORT_METHOD sortMethod, SortOrder sortOrder);
407 379
   void Randomize();
408  
-  void SetMusicThumbs();
409 380
   void FillInDefaultIcons();
410 381
   int GetFolderCount() const;
411 382
   int GetFileCount() const;
@@ -464,8 +435,6 @@ class CFileItemList : public CFileItem
464 435
   void RemoveDiscCache(int windowID = 0) const;
465 436
   bool AlwaysCache() const;
466 437
 
467  
-  void SetCachedMusicThumbs();
468  
-
469 438
   void Swap(unsigned int item1, unsigned int item2);
470 439
 
471 440
   /*! \brief Update an item in the item list
162  xbmc/ThumbnailCache.cpp
@@ -60,165 +60,3 @@ CThumbnailCache* CThumbnailCache::GetThumbnailCache()
60 60
 
61 61
   return m_pCacheInstance;
62 62
 }
63  
-
64  
-bool CThumbnailCache::ThumbExists(const CStdString& strFileName, bool bAddCache /*=false*/)
65  
-{
66  
-  CSingleLock lock (m_cs);
67  
-
68  
-  if (strFileName.size() == 0) return false;
69  
-  map<CStdString, bool>::iterator it;
70  
-  it = m_Cache.find(strFileName);
71  
-  if (it != m_Cache.end())
72  
-    return it->second;
73  
-
74  
-  bool bExists = CFile::Exists(strFileName);
75  
-
76  
-  if (bAddCache)
77  
-    Add(strFileName, bExists);
78  
-  return bExists;
79  
-}
80  
-
81  
-bool CThumbnailCache::IsCached(const CStdString& strFileName)
82  
-{
83  
-  CSingleLock lock (m_cs);
84  
-
85  
-  map<CStdString, bool>::iterator it;
86  
-  it = m_Cache.find(strFileName);
87  
-  return it != m_Cache.end();
88  
-}
89  
-
90  
-void CThumbnailCache::Clear()
91  
-{
92  
-  CSingleLock lock (m_cs);
93  
-
94  
-  if (m_pCacheInstance != NULL)
95  
-  {
96  
-    m_Cache.erase(m_Cache.begin(), m_Cache.end());
97  
-    delete m_pCacheInstance;
98  
-  }
99  
-
100  
-  m_pCacheInstance = NULL;
101  
-}
102  
-
103  
-void CThumbnailCache::Add(const CStdString& strFileName, bool bExists)
104  
-{
105  
-  CSingleLock lock (m_cs);
106  
-
107  
-  map<CStdString, bool>::iterator it;
108  
-  it = m_Cache.find(strFileName);
109  
-  if (it != m_Cache.end())
110  
-    it->second = bExists;
111  
-  else
112  
-    m_Cache.insert(pair<CStdString, bool>(strFileName, bExists));
113  
-}
114  
-
115  
-CStdString CThumbnailCache::GetAlbumThumb(const CFileItem &item)
116  
-{
117  
-  return GetAlbumThumb(item.GetMusicInfoTag());
118  
-}
119  
-
120  
-CStdString CThumbnailCache::GetAlbumThumb(const CMusicInfoTag *musicInfo)
121  
-{
122  
-  if (!musicInfo)
123  
-    return CStdString();
124  
-
125  
-  return GetAlbumThumb(musicInfo->GetAlbum(), StringUtils::Join(!musicInfo->GetAlbumArtist().empty() ? musicInfo->GetAlbumArtist() : musicInfo->GetArtist(), g_advancedSettings.m_musicItemSeparator));
126  
-}
127  
-
128  
-CStdString CThumbnailCache::GetAlbumThumb(const CAlbum &album)
129  
-{
130  
-  return GetAlbumThumb(album.strAlbum, StringUtils::Join(album.artist, g_advancedSettings.m_musicItemSeparator));
131  
-}
132  
-
133  
-CStdString CThumbnailCache::GetAlbumThumb(const CStdString& album, const CStdString& artist)
134  
-{
135  
-  if (album.IsEmpty())
136  
-    return GetMusicThumb("unknown" + artist);
137  
-  if (artist.IsEmpty())
138  
-    return GetMusicThumb(album + "unknown");
139  
-  return GetMusicThumb(album + artist);
140  
-}
141  
-
142  
-CStdString CThumbnailCache::GetArtistThumb(const CFileItem &item)
143  
-{
144  
-  return GetArtistThumb(item.GetLabel());
145  
-}
146  
-
147  
-CStdString CThumbnailCache::GetArtistThumb(const CArtist &artist)
148  
-{
149  
-  return GetArtistThumb(artist.strArtist);
150  
-}
151  
-
152  
-CStdString CThumbnailCache::GetArtistThumb(const CStdString &label)
153  
-{
154  
-  return GetThumb("artist" + label, g_settings.GetMusicArtistThumbFolder());
155  
-}
156  
-
157  
-CStdString CThumbnailCache::GetFanart(const CFileItem &item)
158  
-{
159  
-  // get the locally cached thumb
160  
-  if (item.IsVideoDb() || (item.HasVideoInfoTag() && !item.GetVideoInfoTag()->IsEmpty()))
161  
-  {
162  
-    if (!item.HasVideoInfoTag())
163  
-      return "";
164  
-    if (!item.GetVideoInfoTag()->m_artist.empty())
165  
-      return GetThumb(StringUtils::Join(item.GetVideoInfoTag()->m_artist, g_advancedSettings.m_videoItemSeparator),g_settings.GetMusicFanartFolder());
166  
-    if (!item.m_bIsFolder && !item.GetVideoInfoTag()->m_strShowTitle.IsEmpty())
167  
-    {
168  
-      CStdString showPath;
169  
-      if (!item.GetVideoInfoTag()->m_strShowPath.IsEmpty())
170  
-        showPath = item.GetVideoInfoTag()->m_strShowPath;
171  
-      else
172  
-      {
173  
-        CVideoDatabase database;
174  
-        database.Open();
175  
-        int iShowId = item.GetVideoInfoTag()->m_iIdShow;
176  
-        if (iShowId <= 0)
177  
-          iShowId = database.GetTvShowId(item.GetVideoInfoTag()->m_strPath);
178  
-        CStdString showPath;
179  
-        database.GetFilePathById(iShowId,showPath,VIDEODB_CONTENT_TVSHOWS);
180  
-      }
181  
-      return GetThumb(showPath,g_settings.GetVideoFanartFolder());
182  
-    }
183  
-    CStdString path = item.GetVideoInfoTag()->GetPath();
184  
-    if (path.empty())
185  
-      return "";
186  
-    return GetThumb(path,g_settings.GetVideoFanartFolder());
187  
-  }
188  
-  if (item.HasMusicInfoTag())
189  
-    return GetThumb(StringUtils::Join(item.GetMusicInfoTag()->GetArtist(), g_advancedSettings.m_musicItemSeparator),g_settings.GetMusicFanartFolder());
190  
-
191  
-  return GetThumb(item.GetPath(),g_settings.GetVideoFanartFolder());
192  
-}
193  
-
194  
-CStdString CThumbnailCache::GetThumb(const CStdString &path, const CStdString &path2, bool split /* = false */)
195  
-{
196  
-  // get the locally cached thumb
197  
-  Crc32 crc;
198  
-  crc.ComputeFromLowerCase(path);
199  
-
200  
-  CStdString thumb;
201  
-  if (split)
202  
-  {
203  
-    CStdString hex;
204  
-    hex.Format("%08x", (__int32)crc);
205  
-    thumb.Format("%c\\%08x.tbn", hex[0], (unsigned __int32)crc);
206  
-  }
207  
-  else
208  
-    thumb.Format("%08x.tbn", (unsigned __int32)crc);
209  
-
210  
-  return URIUtils::AddFileToFolder(path2, thumb);
211  
-}
212  
-
213  
-CStdString CThumbnailCache::GetMusicThumb(const CStdString& path)
214  
-{
215  
-  Crc32 crc;
216  
-  CStdString noSlashPath(path);
217  
-  URIUtils::RemoveSlashAtEnd(noSlashPath);
218  
-  crc.ComputeFromLowerCase(noSlashPath);
219  
-  CStdString hex;
220  
-  hex.Format("%08x", (unsigned __int32) crc);
221  
-  CStdString thumb;
222  
-  thumb.Format("%c/%s.tbn", hex[0], hex.c_str());
223  
-  return URIUtils::AddFileToFolder(g_settings.GetMusicThumbFolder(), thumb);
224  
-}
16  xbmc/ThumbnailCache.h
@@ -42,26 +42,10 @@ class CThumbnailCache
42 42
   virtual ~CThumbnailCache();
43 43
 
44 44
   static CThumbnailCache* GetThumbnailCache();
45  
-  bool ThumbExists(const CStdString& strFileName, bool bAddCache = false);
46  
-  void Add(const CStdString& strFileName, bool bExists);
47  
-  void Clear();
48  
-  bool IsCached(const CStdString& strFileName);
49 45
 
50  
-  static CStdString GetMusicThumb(const CStdString &path);
51  
-  static CStdString GetAlbumThumb(const CFileItem &item);
52  
-  static CStdString GetAlbumThumb(const MUSIC_INFO::CMusicInfoTag *musicInfo);
53  
-  static CStdString GetAlbumThumb(const CAlbum &album);
54  
-  static CStdString GetAlbumThumb(const CStdString &album, const CStdString &artist);
55  
-  static CStdString GetArtistThumb(const CArtist &artist);
56  
-  static CStdString GetArtistThumb(const CFileItem &item);
57  
-  static CStdString GetArtistThumb(const CStdString &label);
58  
-  static CStdString GetFanart(const CFileItem &item);
59  
-  static CStdString GetThumb(const CStdString &path, const CStdString &path2, bool split = false);
60 46
 protected:
61 47
 
62 48
   static CThumbnailCache* m_pCacheInstance;
63 49
 
64  
-  std::map<CStdString, bool> m_Cache;
65  
-
66 50
   static CCriticalSection m_cs;
67 51
 };
21  xbmc/Util.cpp
@@ -48,7 +48,6 @@
48 48
 #include "filesystem/DirectoryCache.h"
49 49
 #include "filesystem/SpecialProtocol.h"
50 50
 #include "filesystem/RSSDirectory.h"
51  
-#include "ThumbnailCache.h"
52 51
 #ifdef HAS_FILESYSTEM_RAR
53 52
 #include "filesystem/RarManager.h"
54 53
 #endif
@@ -771,26 +770,6 @@ int64_t CUtil::ToInt64(uint32_t high, uint32_t low)
771 770
   return n;
772 771
 }
773 772
 
774  
-bool CUtil::ThumbExists(const CStdString& strFileName, bool bAddCache)
775  
-{
776  
-  return CThumbnailCache::GetThumbnailCache()->ThumbExists(strFileName, bAddCache);
777  
-}
778  
-
779  
-void CUtil::ThumbCacheAdd(const CStdString& strFileName, bool bFileExists)
780  
-{
781  
-  CThumbnailCache::GetThumbnailCache()->Add(strFileName, bFileExists);
782  
-}
783  
-
784  
-void CUtil::ThumbCacheClear()
785  
-{
786  
-  CThumbnailCache::GetThumbnailCache()->Clear();
787  
-}
788  
-
789  
-bool CUtil::ThumbCached(const CStdString& strFileName)
790  
-{
791  
-  return CThumbnailCache::GetThumbnailCache()->IsCached(strFileName);
792  
-}
793  
-
794 773
 CStdString CUtil::GetNextFilename(const CStdString &fn_template, int max)
795 774
 {
796 775
   if (!fn_template.Find("%03d"))
4  xbmc/Util.h
@@ -87,10 +87,6 @@ class CUtil
87 87
   static bool FindVobSubPair( const std::vector<CStdString>& vecSubtitles, const CStdString& strIdxPath, CStdString& strSubPath );
88 88
   static bool IsVobSub( const std::vector<CStdString>& vecSubtitles, const CStdString& strSubPath );  
89 89
   static int64_t ToInt64(uint32_t high, uint32_t low);
90  
-  static bool ThumbExists(const CStdString& strFileName, bool bAddCache = false);
91  
-  static bool ThumbCached(const CStdString& strFileName);
92  
-  static void ThumbCacheAdd(const CStdString& strFileName, bool bFileExists);
93  
-  static void ThumbCacheClear();
94 90
   static CStdString GetNextFilename(const CStdString &fn_template, int max);
95 91
   static CStdString GetNextPathname(const CStdString &path_template, int max);
96 92
   static void TakeScreenshot();
116  xbmc/filesystem/DirectoryCache.cpp
@@ -50,8 +50,6 @@ void CDirectoryCache::CDir::SetLastAccess(unsigned int &accessCounter)
50 50
 
51 51
 CDirectoryCache::CDirectoryCache(void)
52 52
 {
53  
-  m_iThumbCacheRefCount = 0;
54  
-  m_iMusicThumbCacheRefCount = 0;
55 53
   m_accessCounter = 0;
56 54
 #ifdef _DEBUG
57 55
   m_cacheHits = 0;
@@ -202,17 +200,12 @@ bool CDirectoryCache::FileExists(const CStdString& strFile, bool& bInCache)
202 200
 
203 201
 void CDirectoryCache::Clear()
204 202
 {
205  
-  // this routine clears everything except things we always cache
  203
+  // this routine clears everything
206 204
   CSingleLock lock (m_cs);
207 205
 
208 206
   iCache i = m_cache.begin();
209 207
   while (i != m_cache.end() )
210  
-  {
211  
-    if (!IsCacheDir(i->first))
212  
-      Delete(i++);
213  
-    else
214  
-      i++;
215  
-  }
  208
+    Delete(i++);
216 209
 }
217 210
 
218 211
 void CDirectoryCache::InitCache(set<CStdString>& dirs)
@@ -239,98 +232,6 @@ void CDirectoryCache::ClearCache(set<CStdString>& dirs)
239 232
   }
240 233
 }
241 234
 
242  
-bool CDirectoryCache::IsCacheDir(const CStdString &strPath) const
243  
-{
244  
-  if (m_thumbDirs.find(strPath) == m_thumbDirs.end())
245  
-    return false;
246  
-  if (m_musicThumbDirs.find(strPath) == m_musicThumbDirs.end())
247  
-    return false;
248  
-
249  
-  return true;
250  
-}
251  
-
252  
-void CDirectoryCache::InitThumbCache()
253  
-{
254  
-  CSingleLock lock (m_cs);
255  
-
256  
-  if (m_iThumbCacheRefCount > 0)
257  
-  {
258  
-    m_iThumbCacheRefCount++;
259  
-    return ;
260  
-  }
261  
-  m_iThumbCacheRefCount++;
262  
-
263  
-  // Init video, pictures cache directories
264  
-  if (m_thumbDirs.size() == 0)
265  
-  {
266  
-    // thumbnails directories
267  
-/*    m_thumbDirs.insert(g_settings.GetThumbnailsFolder());
268  
-    for (unsigned int hex=0; hex < 16; hex++)
269  
-    {
270  
-      CStdString strHex;
271  
-      strHex.Format("\\%x",hex);
272  
-      m_thumbDirs.insert(g_settings.GetThumbnailsFolder() + strHex);
273  
-    }*/
274  
-  }
275  
-
276  
-  InitCache(m_thumbDirs);
277  
-}
278  
-
279  
-void CDirectoryCache::ClearThumbCache()
280  
-{
281  
-  CSingleLock lock (m_cs);
282  
-
283  
-  if (m_iThumbCacheRefCount > 1)
284  
-  {
285  
-    m_iThumbCacheRefCount--;
286  
-    return ;
287  
-  }
288  
-
289  
-  m_iThumbCacheRefCount--;
290  
-  ClearCache(m_thumbDirs);
291  
-}
292  
-
293  
-void CDirectoryCache::InitMusicThumbCache()
294  
-{
295  
-  CSingleLock lock (m_cs);
296  
-
297  
-  if (m_iMusicThumbCacheRefCount > 0)
298  
-  {
299  
-    m_iMusicThumbCacheRefCount++;
300  
-    return ;
301  
-  }
302  
-  m_iMusicThumbCacheRefCount++;
303  
-
304  
-  // Init music cache directories
305  
-  if (m_musicThumbDirs.size() == 0)
306  
-  {
307  
-    // music thumbnails directories
308  
-    for (int i = 0; i < 16; i++)
309  
-    {
310  
-      CStdString hex, folder;
311  
-      hex.Format("%x", i);
312  
-      URIUtils::AddFileToFolder(g_settings.GetMusicThumbFolder(), hex, folder);
313  
-      m_musicThumbDirs.insert(folder);
314  
-    }
315  
-  }
316  
-
317  
-  InitCache(m_musicThumbDirs);
318  
-}
319  
-
320  
-void CDirectoryCache::ClearMusicThumbCache()
321  
-{
322  
-  CSingleLock lock (m_cs);
323  
-
324  
-  if (m_iMusicThumbCacheRefCount > 1)
325  
-  {
326  
-    m_iMusicThumbCacheRefCount--;
327  
-    return ;
328  
-  }
329  
-
330  
-  m_iMusicThumbCacheRefCount--;
331  
-  ClearCache(m_musicThumbDirs);
332  
-}
333  
-
334 235
 void CDirectoryCache::CheckIfFull()
335 236
 {
336 237
   CSingleLock lock (m_cs);
@@ -342,7 +243,7 @@ void CDirectoryCache::CheckIfFull()
342 243
   for (iCache i = m_cache.begin(); i != m_cache.end(); i++)
343 244
   {
344 245
     // ensure dirs that are always cached aren't cleared
345  
-    if (!IsCacheDir(i->first) && i->second->m_cacheType != DIR_CACHE_ALWAYS)
  246
+    if (i->second->m_cacheType != DIR_CACHE_ALWAYS)
346 247
     {
347 248
       if (lastAccessed == m_cache.end() || i->second->GetLastAccess() < lastAccessed->second->GetLastAccess())
348 249
         lastAccessed = i;
@@ -371,13 +272,10 @@ void CDirectoryCache::PrintStats() const
371 272
   unsigned int numDirs = 0;
372 273
   for (ciCache i = m_cache.begin(); i != m_cache.end(); i++)
373 274
   {
374  
-    if (!IsCacheDir(i->first))
375  
-    {
376  
-      CDir *dir = i->second;
377  
-      oldest = min(oldest, dir->GetLastAccess());
378  
-      numItems += dir->m_Items->Size();
379  
-      numDirs++;
380  
-    }
  275
+    CDir *dir = i->second;
  276
+    oldest = min(oldest, dir->GetLastAccess());
  277
+    numItems += dir->m_Items->Size();
  278
+    numDirs++;
381 279
   }
382 280
   CLog::Log(LOGDEBUG, "%s - %u folders cached, with %u items total.  Oldest is %u, current is %u", __FUNCTION__, numDirs, numItems, oldest, m_accessCounter);
383 281
 }
9  xbmc/filesystem/DirectoryCache.h
@@ -58,17 +58,12 @@ namespace XFILE
58 58
     void Clear();
59 59
     void AddFile(const CStdString& strFile);
60 60
     bool FileExists(const CStdString& strPath, bool& bInCache);
61  
-    void InitThumbCache();
62  
-    void ClearThumbCache();
63  
-    void InitMusicThumbCache();
64  
-    void ClearMusicThumbCache();
65 61
 #ifdef _DEBUG
66 62
     void PrintStats() const;
67 63
 #endif
68 64
   protected:
69 65
     void InitCache(std::set<CStdString>& dirs);
70 66
     void ClearCache(std::set<CStdString>& dirs);
71  
-    bool IsCacheDir(const CStdString &strPath) const;
72 67
     void CheckIfFull();
73 68
 
74 69
     std::map<CStdString, CDir*> m_cache;
@@ -77,10 +72,6 @@ namespace XFILE
77 72
     void Delete(iCache i);
78 73
 
79 74
     CCriticalSection m_cs;
80  
-    std::set<CStdString> m_thumbDirs;
81  
-    std::set<CStdString> m_musicThumbDirs;
82  
-    int m_iThumbCacheRefCount;
83  
-    int m_iMusicThumbCacheRefCount;
84 75
 
85 76
     unsigned int m_accessCounter;
86 77
 
6  xbmc/music/MusicInfoLoader.cpp
@@ -64,9 +64,6 @@ void CMusicInfoLoader::OnLoaderStart()
64 64
     m_mapFileItems->SetFastLookup(true);
65 65
   }
66 66
 
67  
-  // Precache album thumbs
68  
-  g_directoryCache.InitMusicThumbCache();
69  
-
70 67
   m_strPrevPath.Empty();
71 68
 
72 69
   m_databaseHits = m_tagReads = 0;
@@ -186,9 +183,6 @@ bool CMusicInfoLoader::LoadItem(CFileItem* pItem)
186 183
 
187 184
 void CMusicInfoLoader::OnLoaderFinish()
188 185
 {
189  
-  // clear precached album thumbs
190  
-  g_directoryCache.ClearMusicThumbCache();
191  
-
192 186
   // cleanup last loaded songs from database
193 187
   m_songsMap.Clear();
194 188
 
8  xbmc/music/infoscanner/MusicInfoScanner.cpp
@@ -24,7 +24,6 @@
24 24
 #include "music/tags/MusicInfoTagLoaderFactory.h"
25 25
 #include "MusicAlbumInfo.h"
26 26
 #include "MusicInfoScraper.h"
27  
-#include "filesystem/DirectoryCache.h"
28 27
 #include "filesystem/MusicDatabaseDirectory.h"
29 28
 #include "filesystem/MusicDatabaseDirectory/DirectoryNode.h"
30 29
 #include "Util.h"
@@ -38,6 +37,7 @@
38 37
 #include "dialogs/GUIDialogSelect.h"
39 38
 #include "dialogs/GUIDialogKeyboard.h"
40 39
 #include "filesystem/File.h"
  40
+#include "filesystem/Directory.h"
41 41
 #include "settings/AdvancedSettings.h"
42 42
 #include "settings/GUISettings.h"
43 43
 #include "settings/Settings.h"
@@ -85,9 +85,6 @@ void CMusicInfoScanner::Process()
85 85
 
86 86
     m_bCanInterrupt = true;
87 87
 
88  
-    CUtil::ThumbCacheClear();
89  
-    g_directoryCache.ClearMusicThumbCache();
90  
-
91 88
     if (m_scanType == 0) // load info from files
92 89
     {
93 90
       CLog::Log(LOGDEBUG, "%s - Starting scan", __FUNCTION__);
@@ -149,9 +146,6 @@ void CMusicInfoScanner::Process()
149 146
 
150 147
       m_musicDatabase.EmptyCache();
151 148
 
152  
-      CUtil::ThumbCacheClear();
153  
-      g_directoryCache.ClearMusicThumbCache();
154  
-
155 149
       m_musicDatabase.Close();
156 150
       CLog::Log(LOGDEBUG, "%s - Finished scan", __FUNCTION__);
157 151
 
1  xbmc/music/windows/GUIWindowMusicBase.cpp
@@ -92,7 +92,6 @@ bool CGUIWindowMusicBase::OnBack(int actionID)
92 92
 {
93 93
   if (!g_application.IsMusicScanning())
94 94
   {
95  
-    CUtil::ThumbCacheClear();
96 95
     CUtil::RemoveTempFiles();
97 96
   }
98 97
   return CGUIMediaWindow::OnBack(actionID);
120  xbmc/pictures/Picture.cpp
@@ -34,113 +34,6 @@
34 34
 
35 35
 using namespace XFILE;
36 36
 
37  
-bool CPicture::CreateThumbnail(const CStdString& file, const CStdString& thumbFile, bool checkExistence /*= false*/)
38  
-{
39  
-  // don't create the thumb if it already exists
40  
-  if (checkExistence && CFile::Exists(thumbFile))
41  
-    return true;
42  
-
43  
-  return CacheImage(file, thumbFile, g_advancedSettings.m_thumbSize, g_advancedSettings.m_thumbSize);
44  
-}
45  
-
46  
-bool CPicture::CacheImage(const CStdString& sourceUrl, const CStdString& destFile, int width, int height)
47  
-{
48  
-  if (width > 0 && height > 0)
49  
-  {
50  
-    CLog::Log(LOGINFO, "Caching image from: %s to %s with width %i and height %i", sourceUrl.c_str(), destFile.c_str(), width, height);
51  
-    
52  
-    CJpegIO jpegImage;
53  
-    DllImageLib dll;
54  
-
55  
-    if (URIUtils::IsInternetStream(sourceUrl, true))
56  
-    {
57  
-      CCurlFile http;
58  
-      CStdString data;
59  
-      if (http.Get(sourceUrl, data))
60  
-      {
61  
-        if (URIUtils::GetExtension(sourceUrl).Equals(".jpg") || URIUtils::GetExtension(sourceUrl).Equals(".tbn"))
62  
-        {
63  
-          if (jpegImage.CreateThumbnailFromMemory((unsigned char *)data.c_str(), data.GetLength(), destFile.c_str(), width, height))
64  
-            return true;
65  
-        }
66  
-        if (!dll.Load()) return false;
67  
-        if (!dll.CreateThumbnailFromMemory((BYTE *)data.c_str(), data.GetLength(), URIUtils::GetExtension(sourceUrl).c_str(), destFile.c_str(), width, height))
68  
-        {
69  
-          CLog::Log(LOGERROR, "%s Unable to create new image %s from image %s", __FUNCTION__, destFile.c_str(), sourceUrl.c_str());
70  
-          return false;
71  
-        }
72  
-        return true;
73  
-      }
74  
-      return false;
75  
-    }
76  
-
77  
-    if (URIUtils::GetExtension(sourceUrl).Equals(".jpg") || URIUtils::GetExtension(sourceUrl).Equals(".tbn"))
78  
-    {
79  
-      if (jpegImage.CreateThumbnail(sourceUrl, destFile, width, height, g_guiSettings.GetBool("pictures.useexifrotation")))
80  
-        return true;
81  
-    }
82  
-    if (!dll.Load()) return false;
83  
-    if (!dll.CreateThumbnail(sourceUrl.c_str(), destFile.c_str(), width, height, g_guiSettings.GetBool("pictures.useexifrotation")))
84  
-    {
85  
-      CLog::Log(LOGERROR, "%s Unable to create new image %s from image %s", __FUNCTION__, destFile.c_str(), sourceUrl.c_str());
86  
-      return false;
87  
-    }
88  
-    return true;
89  
-  }
90  
-  else
91  
-  {
92  
-    CLog::Log(LOGINFO, "Caching image from: %s to %s", sourceUrl.c_str(), destFile.c_str());
93  
-    return CFile::Cache(sourceUrl, destFile);
94  
-  }
95  
-}
96  
-
97  
-bool CPicture::CacheThumb(const CStdString& sourceUrl, const CStdString& destFile)
98  
-{
99  
-  return CacheImage(sourceUrl, destFile, g_advancedSettings.m_thumbSize, g_advancedSettings.m_thumbSize);
100  
-}
101  
-
102  
-bool CPicture::CacheFanart(const CStdString& sourceUrl, const CStdString& destFile)
103  
-{
104  
-  int height = g_advancedSettings.m_fanartHeight;
105  
-  // Assume 16:9 size
106  
-  int width = height * 16 / 9;
107  
-
108  
-  return CacheImage(sourceUrl, destFile, width, height);
109  
-}
110  
-
111  
-bool CPicture::CreateThumbnailFromMemory(const unsigned char* buffer, int bufSize, const CStdString& extension, const CStdString& thumbFile)
112  
-{
113  
-  CLog::Log(LOGINFO, "Creating album thumb from memory: %s", thumbFile.c_str());
114  
-  if (extension.Equals("jpg") || extension.Equals("tbn"))
115  
-  {
116  
-    CJpegIO jpegImage;
117  
-    if (jpegImage.CreateThumbnailFromMemory((unsigned char*)buffer, bufSize, thumbFile.c_str(), g_advancedSettings.m_thumbSize, g_advancedSettings.m_thumbSize))
118  
-      return true;
119  
-  }
120  
-  DllImageLib dll;
121  
-  if (!dll.Load()) return false;
122  
-  if (!dll.CreateThumbnailFromMemory((BYTE *)buffer, bufSize, extension.c_str(), thumbFile.c_str(), g_advancedSettings.m_thumbSize, g_advancedSettings.m_thumbSize))
123  
-  {
124  
-    CLog::Log(LOGERROR, "%s: exception with fileType: %s", __FUNCTION__, extension.c_str());
125  
-    return false;
126  
-  }
127  
-  return true;
128  
-}
129  
-
130  
-void CPicture::CreateFolderThumb(const CStdString *thumbs, const CStdString &folderThumb)
131  
-{ // we want to mold the thumbs together into one single one
132  
-  const char *szThumbs[4];
133  
-  for (int i=0; i < 4; i++)
134  
-    szThumbs[i] = thumbs[i].c_str();
135  
-
136  
-  DllImageLib dll;
137  
-  if (!dll.Load()) return;
138  
-  if (!dll.CreateFolderThumbnail(szThumbs, folderThumb.c_str(), g_advancedSettings.m_thumbSize, g_advancedSettings.m_thumbSize))
139  
-  {
140  
-    CLog::Log(LOGERROR, "%s failed for folder thumb %s", __FUNCTION__, folderThumb.c_str());
141  
-  }
142  
-}
143  
-
144 37
 bool CPicture::CreateThumbnailFromSurface(const unsigned char *buffer, int width, int height, int stride, const CStdString &thumbFile)
145 38
 {
146 39
   if (URIUtils::GetExtension(thumbFile).Equals(".jpg"))
@@ -154,19 +47,6 @@ bool CPicture::CreateThumbnailFromSurface(const unsigned char *buffer, int width
154 47
   return dll.CreateThumbnailFromSurface((BYTE *)buffer, width, height, stride, thumbFile.c_str());
155 48
 }
156 49
 
157  
-int CPicture::ConvertFile(const CStdString &srcFile, const CStdString &destFile, float rotateDegrees, int width, int height, unsigned int quality, bool mirror)
158  
-{
159  
-  DllImageLib dll;
160  
-  if (!dll.Load()) return false;
161  
-  int ret = dll.ConvertFile(srcFile.c_str(), destFile.c_str(), rotateDegrees, width, height, quality, mirror);
162  
-  if (ret)
163  
-  {
164  
-    CLog::Log(LOGERROR, "%s: Error %i converting image %s", __FUNCTION__, ret, srcFile.c_str());
165  
-    return ret;
166  
-  }
167  
-  return ret;
168  
-}
169  
-
170 50
 CThumbnailWriter::CThumbnailWriter(unsigned char* buffer, int width, int height, int stride, const CStdString& thumbFile)
171 51
 {
172 52
   m_buffer    = buffer;
8  xbmc/pictures/Picture.h
@@ -27,14 +27,7 @@ class CBaseTexture;
27 27
 class CPicture
28 28
 {
29 29
 public:
30  
-  static bool CreateThumbnailFromMemory(const unsigned char* buffer, int bufSize, const CStdString& extension, const CStdString& thumbFile);
31 30
   static bool CreateThumbnailFromSurface(const unsigned char* buffer, int width, int height, int stride, const CStdString &thumbFile);
32  
-  static int ConvertFile(const CStdString& srcFile, const CStdString& destFile, float rotateDegrees, int width, int height, unsigned int quality, bool mirror=false);
33  
-
34  
-  static void CreateFolderThumb(const CStdString *thumbs, const CStdString &folderThumb);
35  
-  static bool CreateThumbnail(const CStdString& file, const CStdString& thumbFile, bool checkExistence = false);
36  
-  static bool CacheThumb(const CStdString& sourceUrl, const CStdString& destFile);
37  
-  static bool CacheFanart(const CStdString& SourceUrl, const CStdString& destFile);
38 31
 
39 32
   /*! \brief Create a tiled thumb of the given files
40 33
    \param files the files to create the thumb from
@@ -53,7 +46,6 @@ class CPicture
53 46
   static bool CacheTexture(uint8_t *pixels, uint32_t width, uint32_t height, uint32_t pitch, int orientation, uint32_t &dest_width, uint32_t &dest_height, const std::string &dest);
54 47
 
55 48
 private:
56  
-  static bool CacheImage(const CStdString& sourceUrl, const CStdString& destFile, int width, int height);
57 49
   static void GetScale(unsigned int width, unsigned int height, unsigned int &out_width, unsigned int &out_height);
58 50
   static bool ScaleImage(uint8_t *in_pixels, unsigned int in_width, unsigned int in_height, unsigned int in_pitch,
59 51
                          uint8_t *out_pixels, unsigned int out_width, unsigned int out_height, unsigned int out_pitch);
41  xbmc/utils/Fanart.cpp
@@ -22,10 +22,7 @@
22 22
 #include "Fanart.h"
23 23
 #include "utils/XBMCTinyXML.h"
24 24
 #include "URIUtils.h"
25  
-#include "pictures/Picture.h"
26  
-#include "filesystem/CurlFile.h"
27 25
 #include "StringUtils.h"
28  
-#include "filesystem/File.h"
29 26
 
30 27
 const unsigned int CFanart::max_fanart_colors=3;
31 28
 
@@ -133,44 +130,6 @@ bool CFanart::SetPrimaryFanart(unsigned int index)
133 130
   return true;
134 131
 }
135 132
 
136  
-bool CFanart::DownloadThumb(unsigned int index, const CStdString &strDestination) const
137  
-{
138  
-  if (index >= m_fanart.size())
139  
-    return false;
140  
-
141  
-  CStdString thumbURL;
142  
-  if (!m_fanart[index].strPreview.IsEmpty())
143  
-  {
144  
-    if (m_url.IsEmpty())
145  
-      thumbURL = m_fanart[index].strPreview;
146  
-    else
147  
-      thumbURL = URIUtils::AddFileToFolder(m_url, m_fanart[index].strPreview);
148  
-
149  
-    XFILE::CCurlFile http;
150  
-    if (http.Download(thumbURL, strDestination))
151  
-      return true;
152  
-  }
153  
-
154  
-  // try downloading the image instead
155  
-  if (m_url.IsEmpty())
156  
-    thumbURL = m_fanart[index].strImage;
157  
-  else
158  
-    thumbURL = URIUtils::AddFileToFolder(m_url, m_fanart[index].strImage);
159  
-  return DownloadImage(thumbURL, strDestination);
160  
-}
161  
-
162  
-bool CFanart::DownloadImage(const CStdString &url, const CStdString &destination) const
163  
-{
164  
-  return CPicture::CacheFanart(url, destination);
165  
-}
166  
-
167  
-bool CFanart::DownloadImage(const CStdString &strDestination) const
168  
-{
169  
-  if (m_fanart.size() == 0)
170  
-    return false;
171  
-  return DownloadImage(GetImageURL(), strDestination);
172  
-}
173  
-
174 133
 unsigned int CFanart::GetNumFanarts()
175 134
 {
176 135
   return m_fanart.size();
20  xbmc/utils/Fanart.h
@@ -80,19 +80,6 @@ class CFanart
80 80
   /// \return A boolean value indicating success or failure.  This should only return false if the specified index is not a valid fanart
81 81
   bool SetPrimaryFanart(unsigned int index);
82 82
   ///
83  
-  /// Downloads the indicated fanart thumbnail into the specified file
84  
-  /// \param index: 0 based index specfying which fanart thumb should be downloaded
85  
-  /// \param strDestination: CStdString full path and filename indicating where to store the thumbnail
86  
-  /// \return A boolean indicating success or failure of the download
87  
-  bool DownloadThumb(unsigned int index, const CStdString &strDestination) const;
88  
-  ///
89  
-  /// Downloads the primary fanart full resolution image
90  
-  ///
91  
-  /// This interface ONLY downloads the primary image because there should not be a reason to download any other
92  
-  /// \param strDestination: CStdString full path and filename indicating where to store the image
93  
-  /// \return A boolean indicating success of failure of the download
94  
-  bool DownloadImage(const CStdString &strDestination) const;
95  
-  ///
96 83
   /// Returns how many fanarts are stored
97 84
   /// \return An integer indicating how many fanarts are stored in the class.  Fanart indices are 0 to (GetNumFanarts() - 1)
98 85
   unsigned int GetNumFanarts();
@@ -104,13 +91,6 @@ class CFanart
104 91
   /// also the interface used to pass the fanart data from the scraper to CFanart.
105 92
   CStdString m_xml;
106 93
 private:
107  
-  ///
108  
-  /// Downloads the specified image to the specified destination
109  
-  ///
110  
-  /// \param url: CStdString full url indicating where to download the image from
111  
-  /// \param destination: CStdString full path and filename indicating where to store the image
112  
-  /// \return A boolean indicating success of failure of the download
113  
-  bool DownloadImage(const CStdString &url, const CStdString &destination) const;
114 94
   static const unsigned int max_fanart_colors;
115 95
   ///
116 96
   /// Parse various color formats as returned by the sites scraped into a format we recognize
37  xbmc/utils/ScraperUrl.cpp
@@ -27,7 +27,6 @@
27 27
 #include "URL.h"
28 28
 #include "filesystem/CurlFile.h"
29 29
 #include "filesystem/ZipFile.h"
30  
-#include "pictures/Picture.h"
31 30
 #include "URIUtils.h"
32 31
 
33 32
 #include <cstring>
@@ -255,42 +254,6 @@ bool CScraperUrl::Get(const SUrlEntry& scrURL, std::string& strHTML, XFILE::CCur
255 254
   return true;
256 255
 }
257 256
 
258  
-bool CScraperUrl::DownloadThumbnail(const CStdString &thumb, const CScraperUrl::SUrlEntry& entry)
259  
-{
260  
-  if (entry.m_url.IsEmpty())
261  
-    return false;
262  
-
263  
-  CURL url(entry.m_url);
264  
-  if (url.GetProtocol() != "http")
265  
-  { // do a direct file copy
266  
-    try
267  
-    {
268  
-      return CPicture::CreateThumbnail(entry.m_url, thumb);
269  
-    }
270  
-    catch (...)
271  
-    {
272  
-      XFILE::CFile::Delete(thumb);
273  
-    }
274  
-    return false;
275  
-  }
276  
-
277  
-  XFILE::CCurlFile http;
278  
-  http.SetReferer(entry.m_spoof);
279  
-  CStdString thumbData;
280  
-  if (http.Get(entry.m_url, thumbData))
281  
-  {
282  
-    try
283  
-    {
284  
-      return CPicture::CreateThumbnailFromMemory((const BYTE *)thumbData.c_str(), thumbData.size(), URIUtils::GetExtension(entry.m_url), thumb);
285  
-    }
286  
-    catch (...)
287  
-    {
288  
-      XFILE::CFile::Delete(thumb);
289  
-    }
290  
-  }
291  
-  return false;
292  
-}
293  
-
294 257
 // XML format is of strUrls is:
295 258
 // <TAG><url>...</url>...</TAG> (parsed by ParseElement) or <url>...</url> (ditto)
296 259
 bool CScraperUrl::ParseEpisodeGuide(CStdString strUrls)
1  xbmc/utils/ScraperUrl.h
@@ -77,7 +77,6 @@ class CScraperUrl
77 77
   void Clear();
78 78
   static bool Get(const SUrlEntry&, std::string&, XFILE::CCurlFile& http,
79 79
                  const CStdString& cacheContext);
80  
-  static bool DownloadThumbnail(const CStdString &thumb, const SUrlEntry& entry);
81 80
 
82 81
   CStdString m_xml;
83 82
   CStdString m_spoof; // for backwards compatibility only!
20  xbmc/video/VideoInfoScanner.cpp
@@ -28,7 +28,6 @@
28 28
 #include "NfoFile.h"
29 29
 #include "utils/RegExp.h"
30 30
 #include "utils/md5.h"
31  
-#include "pictures/Picture.h"
32 31
 #include "filesystem/StackDirectory.h"
33 32
 #include "VideoInfoDownloader.h"
34 33
 #include "GUIInfoManager.h"
@@ -1191,25 +1190,6 @@ namespace VIDEO
1191 1190
       ApplyThumbToFolder(parentDir, thumb);
1192 1191
   }
1193 1192
 
1194  
-  void CVideoInfoScanner::DownloadImage(const CStdString &url, const CStdString &destination, bool asThumb /*= true */, CGUIDialogProgress *progress /*= NULL */)
1195  
-  {
1196  
-    if (progress)
1197  
-    {
1198  
-      progress->SetLine(2, 415);
1199  
-      progress->Progress();
1200  
-    }
1201  
-    bool result = false;
1202  
-    if (asThumb)
1203  
-      result = CPicture::CreateThumbnail(url, destination);
1204  
-    else
1205  
-      result = CPicture::CacheFanart(url, destination);