Permalink
Browse files

drop previously cached path->texture lookups to get rid of previously…

… cached stuff
  • Loading branch information...
1 parent 2c1fa86 commit 457261e6681c77de1aee5ee91a2b193f4aa5b615 Jonathan Marshall committed Feb 10, 2012
Showing with 10 additions and 4 deletions.
  1. +4 −0 xbmc/TextureDatabase.cpp
  2. +6 −4 xbmc/TextureDatabase.h
View
@@ -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 (...)
{
View
@@ -35,16 +35,18 @@ class CTextureDatabase : public CDatabase
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
*/
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 @@ class CTextureDatabase : public CDatabase
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"; };
};

0 comments on commit 457261e

Please sign in to comment.