|
|
|
@ -320,7 +320,7 @@ namespace
@@ -320,7 +320,7 @@ namespace
|
|
|
|
|
// - "full_update": full data update flag
|
|
|
|
|
// - "torrents": dictionary contains information about torrents.
|
|
|
|
|
// - "torrents_removed": a list of hashes of removed torrents
|
|
|
|
|
// - "categories": list of categories
|
|
|
|
|
// - "categories": map of categories info
|
|
|
|
|
// - "categories_removed": list of removed categories
|
|
|
|
|
// - "server_state": map contains information about the state of the server
|
|
|
|
|
// The keys of the 'torrents' dictionary are hashes of torrents.
|
|
|
|
@ -399,11 +399,16 @@ void SyncController::maindataAction()
@@ -399,11 +399,16 @@ void SyncController::maindataAction()
|
|
|
|
|
|
|
|
|
|
data["torrents"] = torrents; |
|
|
|
|
|
|
|
|
|
QVariantList categories; |
|
|
|
|
for (auto i = session->categories().cbegin(); i != session->categories().cend(); ++i) |
|
|
|
|
categories << i.key(); |
|
|
|
|
QVariantList categoriesList; |
|
|
|
|
const auto categories = session->categories(); |
|
|
|
|
for (auto key : categories.keys()) { |
|
|
|
|
categoriesList << QVariantMap { |
|
|
|
|
{"name", key}, |
|
|
|
|
{"savePath", categories.value(key)}, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
data["categories"] = categories; |
|
|
|
|
data["categories"] = categoriesList; |
|
|
|
|
|
|
|
|
|
QVariantMap serverState = getTranserInfo(); |
|
|
|
|
serverState[KEY_SYNC_MAINDATA_QUEUEING] = session->isQueueingSystemEnabled(); |
|
|
|
|