Allow to use Category paths in "Manual" mode

If the option is enabled any relative save path will be resolved against an appropriate Category path instead of Global default one.

PR #16330.
This commit is contained in:
Vladimir Golovnev 2022-02-02 09:24:09 +03:00 committed by GitHub
parent 0012a3ede7
commit facfa26eed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 66 additions and 21 deletions

View file

@ -115,6 +115,7 @@ void AppController::preferencesAction()
data["save_path"] = Utils::Fs::toNativePath(session->savePath());
data["temp_path_enabled"] = session->isDownloadPathEnabled();
data["temp_path"] = Utils::Fs::toNativePath(session->downloadPath());
data["use_category_paths_in_manual_mode"] = session->useCategoryPathsInManualMode();
data["export_dir"] = Utils::Fs::toNativePath(session->torrentExportDirectory());
data["export_dir_fin"] = Utils::Fs::toNativePath(session->finishedTorrentExportDirectory());
@ -404,6 +405,8 @@ void AppController::setPreferencesAction()
session->setDownloadPathEnabled(it.value().toBool());
if (hasKey("temp_path"))
session->setDownloadPath(it.value().toString());
if (hasKey("use_category_paths_in_manual_mode"))
session->setUseCategoryPathsInManualMode(it.value().toBool());
if (hasKey("export_dir"))
session->setTorrentExportDirectory(it.value().toString());
if (hasKey("export_dir_fin"))