mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 07:46:17 -07: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:
parent
b0e41abf5a
commit
1c0f8b4289
48 changed files with 1457 additions and 599 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue