From 457261e6681c77de1aee5ee91a2b193f4aa5b615 Mon Sep 17 00:00:00 2001 From: Jonathan Marshall Date: Sat, 11 Feb 2012 12:59:07 +1300 Subject: drop previously cached path->texture lookups to get rid of previously cached stuff --- xbmc/TextureDatabase.cpp | 4 ++++ xbmc/TextureDatabase.h | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xbmc/TextureDatabase.cpp b/xbmc/TextureDatabase.cpp index 121f237454..4bb432c7c3 100644 --- a/xbmc/TextureDatabase.cpp +++ b/xbmc/TextureDatabase.cpp @@ -92,6 +92,10 @@ bool CTextureDatabase::UpdateOldVersion(int version) } m_pDS->close(); } + if (version < 8) + { // get rid of old cached thumbs as they were previously set to the cached thumb name instead of the source thumb + m_pDS->exec("delete from path"); + } } catch (...) { diff --git a/xbmc/TextureDatabase.h b/xbmc/TextureDatabase.h index ca67b8a7cc..6dc33514cc 100644 --- a/xbmc/TextureDatabase.h +++ b/xbmc/TextureDatabase.h @@ -35,7 +35,7 @@ public: bool ClearCachedTexture(const CStdString &originalURL, CStdString &cacheFile); /*! \brief Get a texture associated with the given path - Used for retrieval of previously discovered (and cached) images to save + Used for retrieval of previously discovered images to save stat() on the filesystem all the time \param url path that may be associated with a texture \return URL of the texture associated with the given path @@ -43,8 +43,10 @@ public: CStdString GetTextureForPath(const CStdString &url); /*! \brief Set a texture associated with the given path - Used for setting of previously discovered (and cached) images to save - stat() on the filesystem all the time + Used for setting of previously discovered images to save + stat() on the filesystem all the time. Should be used to set + the actual image path, not the cached image path (the image will be + cached at load time.) \param url path that was used to find the texture \param texture URL of the texture to associate with the path */ @@ -60,6 +62,6 @@ protected: virtual bool CreateTables(); virtual bool UpdateOldVersion(int version); - virtual int GetMinVersion() const { return 7; }; + virtual int GetMinVersion() const { return 8; }; const char *GetBaseDBName() const { return "Textures"; }; }; -- cgit v1.2.3