forked from ckilb/pocketbooksync.koplugin
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
get completed from book status (+ related improvements)
This is motivated by someone reporting that books with non-linear fragments don't get marked as read (https://www.mobileread.com/forums/showpost.php?p=4366641&postcount=28). To make this work, we additionally hook into the CloseDocument and EndOfBook events. These don't pass the page number, so we get the page number by multiplying getLastPercent() and getPageCount(). Should be accurate enough, getLastPercent is accurate to hundredths of a percent. It's not perfect, as the readerstatus module doesn't emit events when a book is marked as finished, so this only gets synced when the book is closed and another one (or the file manager) is opened.
- Loading branch information
Showing
1 changed file
with
43 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters