Send optional document metadata with KOSync progress uploads
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user