Send optional document metadata with KOSync progress uploads

This commit is contained in:
jpirnay
2026-05-06 22:44:47 +02:00
parent bd71bf465c
commit dedc5bd4af
10 changed files with 78 additions and 7 deletions
+7
View File
@@ -555,6 +555,13 @@ KOReaderSyncClient::Error KOReaderSyncClient::updateProgress(const KOReaderProgr
doc["device"] = DEVICE_NAME;
doc["device_id"] = DEVICE_ID;
if (progress.metadata) {
JsonObject meta = doc["metadata"].to<JsonObject>();
meta["filename"] = progress.metadata->filename;
meta["title"] = progress.metadata->title;
meta["authors"] = progress.metadata->authors;
}
std::string body;
serializeJson(doc, body);