harmtemolder / koreader-calibre-plugin

A calibre plugin to synchronize metadata from KOReader to calibre
GNU General Public License v3.0
60 stars 6 forks source link

Sync config options: "Sync more recent" and "No sync if already finished" #8

Closed elmodor closed 1 year ago

elmodor commented 1 year ago

This PR adds two functionalities similar to some options that the kobo utils offers. It also fixes a crash for wireless connected devices where os.path.getmtime(path) can not be called.

New config options, default off:

  1. Snyc if more recent Only syncs metadata if the data is newer than the data stored in calibre. It checks for column_date_sidecar_modified and has a fallback to use column_percent_read(_int). This is a partial implementation for #7 but it is missing a proper method to obtain the modified date for wireless connected devices.
  2. No sync if book is already finished Only syncs metadata if the book was not yet finished. Once a book has been finished new data will not be synced anymore.
harmtemolder commented 1 year ago

@elmodor Thanks for splitting up your improvements in separate PRs. That helped my understanding of each. Unfortunately now this one conflicts with one of the ones I've already merged. Could you resolve that? After that I'll test the result and publish a new release here and on MobileRead

elmodor commented 1 year ago

@harmtemolder sure thing.

I would send one more PR after you merged this one to adjust the README and/or to at least to add a few lines for including the yes/no changes together with the changes for the one to force setting the reading status.