2 * Copyright (C) 2005-2013 Team XBMC
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with XBMC; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
21 #include "ThumbnailCache.h"
22 #include "filesystem/File.h"
23 #include "threads/SingleLock.h"
26 #include "video/VideoInfoTag.h"
27 #include "video/VideoDatabase.h"
28 #include "music/tags/MusicInfoTag.h"
29 #include "music/Album.h"
30 #include "music/Artist.h"
31 #include "settings/Settings.h"
32 #include "utils/URIUtils.h"
33 #include "utils/Crc32.h"
34 #include "utils/StringUtils.h"
35 #include "filesystem/StackDirectory.h"
36 #include "settings/AdvancedSettings.h"
39 using namespace XFILE;
40 using namespace MUSIC_INFO;
42 CThumbnailCache* CThumbnailCache::m_pCacheInstance = NULL;
44 CCriticalSection CThumbnailCache::m_cs;
46 CThumbnailCache::~CThumbnailCache()
49 CThumbnailCache::CThumbnailCache()
53 CThumbnailCache* CThumbnailCache::GetThumbnailCache()
55 CSingleLock lock (m_cs);
57 if (m_pCacheInstance == NULL)
58 m_pCacheInstance = new CThumbnailCache;
60 return m_pCacheInstance;