Skip to content

Commit

Permalink
fix(kobo): Only sync altered books
Browse files Browse the repository at this point in the history
  • Loading branch information
ragusa87 committed Aug 12, 2024
1 parent 3110b24 commit bda5e70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/Kobo/KoboSyncController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function apiEndpoint(KoboDevice $kobo, SyncToken $syncToken, Request $req
$forced = $kobo->isForceSync() || $request->query->has('force');
$count = $this->koboSyncedBookRepository->countByKoboDevice($kobo);
if ($forced || $count === 0) {
if ($count > 0 || $forced) {
if ($forced) {
$this->logger->debug('Force sync for Kobo {id}', ['id' => $kobo->getId()]);
$this->koboSyncedBookRepository->deleteAllSyncedBooks($kobo);
$kobo->setForceSync(false);
Expand Down

0 comments on commit bda5e70

Please sign in to comment.