Quote:
Originally Posted by jindroush
Hi guys,
can anyone responsible for the release do this change in the future releases?
file: check_fix.py
function: check_and_update_file_sizes
original line:
db_size = db.sizeof_format(book_id, fmt, index_is_id=True)
replace by:
db_size = next(db.backend.execute( "SELECT uncompressed_size FROM data WHERE book=? AND format=?", ( book_id, fmt ) ))[0]
|
I am not going to add direct sql access to calibre's tables.
What I will do is talk with Kovid about me adding API to base calibre to get that number. If he agrees then after the API change is released I will change the plugin appropriately.
Also note that your change isn't sufficient. The plugin calls
Code:
db.format_metadata(book_id, fmt, update_db=True, commit=True)
Note that it doesn't use the named parameter
use_cache, which by default is true.
Use_cache overrides
update_db so the database is not updated. I will fix that as well if we get that far.