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
+2
View File
@@ -296,6 +296,7 @@ bool JsonSettingsIO::saveKOReader(const KOReaderCredentialStore& store, const ch
doc["password_obf"] = obfuscation::obfuscateToBase64(store.getPassword());
doc["serverUrl"] = store.getServerUrl();
doc["matchMethod"] = static_cast<uint8_t>(store.getMatchMethod());
doc["sendMetadata"] = store.getSendMetadata();
String json;
serializeJson(doc, json);
@@ -321,6 +322,7 @@ bool JsonSettingsIO::loadKOReader(KOReaderCredentialStore& store, const char* js
store.serverUrl = doc["serverUrl"] | std::string("");
uint8_t method = doc["matchMethod"] | (uint8_t)0;
store.matchMethod = static_cast<DocumentMatchMethod>(method);
store.sendMetadata = doc["sendMetadata"] | false;
LOG_DBG("KRS", "Loaded KOReader credentials for user: %s", store.username.c_str());
return true;