View Single Post
Old 07-15-2020, 04:38 AM   #13
jindroush
Connoisseur
jindroush doesn't litterjindroush doesn't litter
 
Posts: 94
Karma: 104
Join Date: Nov 2014
Device: Kindle
Fix

So I replaced this line (in QualityCheck.zip/check_fix.py)

db_size = db.sizeof_format(book_id, fmt, index_is_id=True)

with

db_size = next(db.backend.execute( "SELECT uncompressed_size FROM data WHERE book=? AND format=?", ( book_id, fmt ) ))[0]

which does what I need in QualityCheck/Fix/Check and repair file sizes. I wasn't able to do that using any LibraryDatabase or Cache call.
jindroush is offline   Reply With Quote