Added timestamp from koreader_last_sync_time to returned json on GET for KOReader Sync API (#1518)

This commit is contained in:
astrodad
2025-11-20 21:12:33 -07:00
committed by GitHub
parent 014874cd11
commit 3a8a46b3cc
3 changed files with 49 additions and 0 deletions
@@ -8,6 +8,7 @@ import lombok.ToString;
@Builder
@ToString
public class KoreaderProgress {
private Long timestamp;
private String document;
private Float percentage;
private String progress;
@@ -51,7 +51,12 @@ public class KoreaderService {
progress.getKoreaderProgress(), progress.getKoreaderProgressPercent(),
authDetails.getBookLoreUserId(), bookHash);
Long timestamp = progress.getKoreaderLastSyncTime() != null
? progress.getKoreaderLastSyncTime().getEpochSecond()
: null;
return KoreaderProgress.builder()
.timestamp(timestamp)
.document(bookHash)
.progress(progress.getKoreaderProgress())
.percentage(progress.getKoreaderProgressPercent())