diff options
author | Jonathan Marshall <jmarshall@never.you.mind> | 2012-02-11 12:59:07 +1300 |
---|---|---|
committer | Jonathan Marshall <jmarshall@never.you.mind> | 2012-03-31 16:25:55 +1300 |
commit | 457261e6681c77de1aee5ee91a2b193f4aa5b615 (patch) | |
tree | 38c262fbd75c3325dcc986bd80cb7e710b9ac28c | |
parent | 2c1fa865851adf49f4defb1a6635d652bbdbbb26 (diff) |
drop previously cached path->texture lookups to get rid of previously cached stuff
-rw-r--r-- | xbmc/TextureDatabase.cpp | 4 | ||||
-rw-r--r-- | 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"; }; }; |