WebUI: Implement subcategories

PR #18740.
This commit is contained in:
Bartu Özen 2023-04-02 11:02:22 +03:00 committed by GitHub
parent 40e28930a4
commit b55d4b1733
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 86 additions and 7 deletions

View file

@ -134,6 +134,7 @@ void AppController::preferencesAction()
data[u"torrent_changed_tmm_enabled"_qs] = !session->isDisableAutoTMMWhenCategoryChanged();
data[u"save_path_changed_tmm_enabled"_qs] = !session->isDisableAutoTMMWhenDefaultSavePathChanged();
data[u"category_changed_tmm_enabled"_qs] = !session->isDisableAutoTMMWhenCategorySavePathChanged();
data[u"use_subcategories"] = session->isSubcategoriesEnabled();
data[u"save_path"_qs] = session->savePath().toString();
data[u"temp_path_enabled"_qs] = session->isDownloadPathEnabled();
data[u"temp_path"_qs] = session->downloadPath().toString();
@ -489,6 +490,8 @@ void AppController::setPreferencesAction()
session->setDisableAutoTMMWhenDefaultSavePathChanged(!it.value().toBool());
if (hasKey(u"category_changed_tmm_enabled"_qs))
session->setDisableAutoTMMWhenCategorySavePathChanged(!it.value().toBool());
if (hasKey(u"use_subcategories"_qs))
session->setSubcategoriesEnabled(it.value().toBool());
if (hasKey(u"save_path"_qs))
session->setSavePath(Path(it.value().toString()));
if (hasKey(u"temp_path_enabled"_qs))