mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -06:00
@@ -141,6 +141,8 @@ void AppController::preferencesAction()
|
||||
data[u"scan_dirs"_qs] = nativeDirs;
|
||||
// === END DEPRECATED CODE === //
|
||||
|
||||
// Excluded file names
|
||||
data[u"excluded_file_names_enabled"_qs] = session->isExcludedFileNamesEnabled();
|
||||
data[u"excluded_file_names"_qs] = session->excludedFileNames().join(u'\n');
|
||||
|
||||
// Email notification upon download completion
|
||||
@@ -478,6 +480,9 @@ void AppController::setPreferencesAction()
|
||||
}
|
||||
// === END DEPRECATED CODE === //
|
||||
|
||||
// Excluded file names
|
||||
if (hasKey(u"excluded_file_names_enabled"_qs))
|
||||
session->setExcludedFileNamesEnabled(it.value().toBool());
|
||||
if (hasKey(u"excluded_file_names"_qs))
|
||||
session->setExcludedFileNames(it.value().toString().split(u'\n'));
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#include "base/utils/version.h"
|
||||
#include "api/isessionmanager.h"
|
||||
|
||||
inline const Utils::Version<int, 3, 2> API_VERSION {2, 8, 12};
|
||||
inline const Utils::Version<int, 3, 2> API_VERSION {2, 8, 13};
|
||||
|
||||
class APIController;
|
||||
class AuthController;
|
||||
|
||||
@@ -131,8 +131,10 @@
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="settings">
|
||||
<legend>QBT_TR(Excluded file names)QBT_TR[CONTEXT=OptionsDialog]</legend>
|
||||
<label for="excludedFileNamesTextarea">QBT_TR(Filters:)QBT_TR[CONTEXT=OptionsDialog]</label><br>
|
||||
<legend>
|
||||
<input type="checkbox" id="excludedFileNamesCheckbox" onclick="qBittorrent.Preferences.updateExcludedFileNamesEnabled();" />
|
||||
<label for="excludedFileNamesCheckbox">QBT_TR(Excluded file names)QBT_TR[CONTEXT=OptionsDialog]</label>
|
||||
</legend>
|
||||
<textarea id="excludedFileNamesTextarea" rows="6" cols="70"></textarea>
|
||||
</fieldset>
|
||||
|
||||
@@ -1326,6 +1328,7 @@
|
||||
updateExportDirEnabled: updateExportDirEnabled,
|
||||
updateExportDirFinEnabled: updateExportDirFinEnabled,
|
||||
addWatchFolder: addWatchFolder,
|
||||
updateExcludedFileNamesEnabled: updateExcludedFileNamesEnabled,
|
||||
changeWatchFolderSelect: changeWatchFolderSelect,
|
||||
updateMailNotification: updateMailNotification,
|
||||
updateMailAuthSettings: updateMailAuthSettings,
|
||||
@@ -1423,6 +1426,11 @@
|
||||
return folders;
|
||||
};
|
||||
|
||||
const updateExcludedFileNamesEnabled = function() {
|
||||
const isAExcludedFileNamesEnabled = $('excludedFileNamesCheckbox').getProperty('checked');
|
||||
$('excludedFileNamesTextarea').setProperty('disabled', !isAExcludedFileNamesEnabled);
|
||||
};
|
||||
|
||||
const updateExportDirEnabled = function() {
|
||||
const isExportDirEnabled = $('exportdir_checkbox').getProperty('checked');
|
||||
$('exportdir_text').setProperty('disabled', !isExportDirEnabled);
|
||||
@@ -1739,6 +1747,9 @@
|
||||
addWatchFolder(folder, sel, other);
|
||||
}
|
||||
addWatchFolder();
|
||||
|
||||
// Excluded file names
|
||||
$('excludedFileNamesCheckbox').setProperty('checked', pref.excluded_file_names_enabled);
|
||||
$('excludedFileNamesTextarea').setProperty('value', pref.excluded_file_names);
|
||||
|
||||
// Email notification upon download completion
|
||||
@@ -2060,6 +2071,9 @@
|
||||
|
||||
// Automatically add torrents from
|
||||
settings.set('scan_dirs', getWatchedFolders());
|
||||
|
||||
// Excluded file names
|
||||
settings.set('excluded_file_names_enabled', $('excludedFileNamesCheckbox').getProperty('checked'));
|
||||
settings.set('excluded_file_names', $('excludedFileNamesTextarea').getProperty('value'));
|
||||
|
||||
// Email notification upon download completion
|
||||
|
||||
Reference in New Issue
Block a user