mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
Allow to remember torrent content files deletion in WebUI
Add a 'remember choice' button to the WebUI Torrent Deletion dialog that sets the default file deletion setting. The setting is shared with GUI, so if you set it in WebUI and open the Qt app, the 'delete files' checkbox will match WebUI (checked or unchecked). PR #20150. --------- Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
This commit is contained in:
@@ -119,6 +119,8 @@ void AppController::preferencesAction()
|
||||
data[u"file_log_delete_old"_s] = app()->isFileLoggerDeleteOld();
|
||||
data[u"file_log_age"_s] = app()->fileLoggerAge();
|
||||
data[u"file_log_age_type"_s] = app()->fileLoggerAgeType();
|
||||
// Delete torrent contents files on torrent removal
|
||||
data[u"delete_torrent_content_files"_s] = pref->deleteTorrentFilesAsDefault();
|
||||
|
||||
// Downloads
|
||||
// When adding a torrent
|
||||
@@ -494,6 +496,9 @@ void AppController::setPreferencesAction()
|
||||
app()->setFileLoggerAge(it.value().toInt());
|
||||
if (hasKey(u"file_log_age_type"_s))
|
||||
app()->setFileLoggerAgeType(it.value().toInt());
|
||||
// Delete torrent content files on torrent removal
|
||||
if (hasKey(u"delete_torrent_content_files"_s))
|
||||
pref->setDeleteTorrentFilesAsDefault(it.value().toBool());
|
||||
|
||||
// Downloads
|
||||
// When adding a torrent
|
||||
|
||||
Reference in New Issue
Block a user