From 38e90a818bf09f6c16bfe2c4cf6d63c8d462efda Mon Sep 17 00:00:00 2001 From: jpirnay Date: Mon, 20 Apr 2026 11:39:21 +0200 Subject: [PATCH] Make json field check more lenient --- lib/KOReaderSync/KOReaderSyncClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/KOReaderSync/KOReaderSyncClient.cpp b/lib/KOReaderSync/KOReaderSyncClient.cpp index 1e60c4c0..2bc41079 100644 --- a/lib/KOReaderSync/KOReaderSyncClient.cpp +++ b/lib/KOReaderSync/KOReaderSyncClient.cpp @@ -519,7 +519,7 @@ KOReaderSyncClient::Error KOReaderSyncClient::getProgress(const std::string& doc // kosync convention: no stored progress for the document is signalled by // HTTP 200 with an empty body ("{}"), not by 404. Detect that here so the // caller doesn't apply a zeroed-out position as if it were real progress. - if (doc["document"].isNull() || doc["progress"].isNull()) { + if (doc["progress"].isNull()) { std::string jsonDump; serializeJson(doc, jsonDump); LOG_DBG("KOSync", "Empty progress payload — treating as not found | payload=%s", jsonDump.c_str());