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.
|