mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 06:01:33 -06:00
Redesign "Incomplete folder" feature
Change "Incomplete/temp folder" term with "download folder". Allow to set "download folder" per torrent (in manual mode) and per category (in automatic mode).
This commit is contained in:
committed by
Vladimir Golovnev (glassez)
parent
b0e41abf5a
commit
1c0f8b4289
@@ -209,6 +209,7 @@ namespace
|
||||
case QMetaType::ULongLong:
|
||||
case QMetaType::UInt:
|
||||
case QMetaType::QDateTime:
|
||||
case QMetaType::Nullptr:
|
||||
if (prevData[key] != value)
|
||||
syncData[key] = value;
|
||||
break;
|
||||
@@ -426,6 +427,7 @@ SyncController::~SyncController()
|
||||
// - "uploaded_session": Amount of data uploaded since program open
|
||||
// - "amount_left": Amount of data left to download
|
||||
// - "save_path": Torrent save path
|
||||
// - "download_path": Torrent download path
|
||||
// - "completed": Amount of data completed
|
||||
// - "max_ratio": Upload max share ratio
|
||||
// - "max_seeding_time": Upload max seeding time
|
||||
@@ -496,15 +498,13 @@ void SyncController::maindataAction()
|
||||
data["torrents"] = torrents;
|
||||
|
||||
QVariantHash categories;
|
||||
const QStringMap categoriesList = session->categories();
|
||||
for (auto it = categoriesList.cbegin(); it != categoriesList.cend(); ++it)
|
||||
const QStringList categoriesList = session->categories();
|
||||
for (const auto &categoryName : categoriesList)
|
||||
{
|
||||
const QString &key = it.key();
|
||||
categories[key] = QVariantMap
|
||||
{
|
||||
{"name", key},
|
||||
{"savePath", it.value()}
|
||||
};
|
||||
const BitTorrent::CategoryOptions categoryOptions = session->categoryOptions(categoryName);
|
||||
QJsonObject category = categoryOptions.toJSON();
|
||||
category.insert(QLatin1String("name"), categoryName);
|
||||
categories[categoryName] = category.toVariantMap();
|
||||
}
|
||||
data["categories"] = categories;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user