Quote:
Originally Posted by kiwidude
Forgot to also make this change in 1.1.2 - again for an internal Calibre codebase change that would break this plugin in future. This plugin now uses the db.format_hash() and db.format_metadata() functions Kovid added in 0.8.7 as detailed in this thread.
|
Another thing you might want to know...
Starting with the next release, format_metadata caches the data returned by os.stat() during a given calibre session. If a format is changed outside of calibre, then the cache will be incorrect, containing stale data. For example, calibre won't know the file has changed if you use open_with and sigil to change it, so format_metadata can return stale data.
The cache is not persistent. It is rebuilt every time calibre starts, which limits the lifetime of the stale data.
EDIT: I should also point out that format_metadata() has a new additional argument that indicates whether or not it is permissible to use the cache.