feat: Send optional document metadata with KOSync progress uploads (#1820)

This commit is contained in:
Nick Perez
2026-07-12 23:50:38 -04:00
committed by GitHub
parent 39ea4b045f
commit 3a97f3e63e
33 changed files with 95 additions and 11 deletions
+6
View File
@@ -148,6 +148,12 @@ KOReaderSyncClient::Error KOReaderSyncClient::updateProgress(const KOReaderProgr
// Build JSON body
JsonDocument doc;
doc["document"] = progress.document;
if (progress.metadata.has_value()) {
auto meta = doc["metadata"].to<JsonObject>();
meta["filename"] = progress.metadata->filename;
meta["title"] = progress.metadata->title;
meta["authors"] = progress.metadata->authors;
}
doc["progress"] = progress.progress;
doc["percentage"] = progress.percentage;
doc["device"] = DEVICE_NAME;