Implement KOReader's partial MD5 algorithm for document identification. This hash allows KOReader devices to match local files with server records for reading progress synchronization (KOSync).
Books may not have a path (e.g., physical books, metadata-only entries).
Updated path-dependent operations to handle None gracefully:
- get_file: raise ValueError if book has no path
- update_book: skip path relocation if no path exists
- remove_files: skip filesystem cleanup if no path exists
Also fixed _save_book_files return type and removed unused imports.
The create, update, and delete methods had incompatible signatures
resulting in typecheck errors. Renamed to create_book, update_book, and
delete_books.
The Darwin epub test cases used absolute paths. I hadn't notices until switching machines, whcih caused errors in the test harness. Changed to relative paths to be consistent with other test cases.
Updated book progress model in anticipation of the KOReader sync
feature.
Renamed properties:
- renamed "progress" to "percentage"
- renamed "pdf_loc" to "pdf_page"
- renamed "epub_loc" to "epub_cfi"
New properties:
- "epub_xpointer", marks the location of an epub in KOReader
- "device", the device type that updated the progress
- "device_id", the id of the device that updated the progress