fix(kobo): replace a stale delivery instead of failing its download forever

When a book's file changed after it was offered to a Kobo, every download
returned 409 because the offer could no longer be rebuilt. A device download
now retires that offer and serves a fresh one from the current file, and the
device bookmark adopts the copy it downloaded. Log the conflict code when a
sync defers a delivery. Also drop a dev-only relocate log from the reader.

Fixes #1816
This commit is contained in:
neon
2026-10-16 23:23:08 +00:00
parent 7f12e8cd6d
commit e070460876
6 changed files with 235 additions and 18 deletions
@@ -254,17 +254,6 @@ export function useFoliate(
view.addEventListener('relocate', (e: Event) => {
const detail = (e as CustomEvent).detail
fraction.value = detail?.fraction ?? 0
if (import.meta.env.DEV) {
console.info('[foliate.relocate]', {
source: detail?.source ?? null,
koboLocationType: detail?.koboLocationType ?? null,
koboLocationValue: detail?.koboLocationValue ?? null,
contentSourceProgressPercent: detail?.contentSourceProgressPercent ?? null,
koreaderProgress: detail?.koreaderProgress ?? null,
fraction: detail?.fraction ?? null,
cfi: detail?.cfi ?? null,
})
}
onRelocate?.(detail)
})