WebUI: Correctly apply changed "save path" of RSS rules

PR #21030.
Closes #20141.
This commit is contained in:
Vladimir Golovnev 2024-07-08 10:08:28 +03:00 committed by Vladimir Golovnev (Glassez)
parent 47723115f6
commit efa517ea90
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7

View file

@ -597,6 +597,9 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
rulesList[rule].torrentParams.save_path = $('saveToText').value; rulesList[rule].torrentParams.save_path = $('saveToText').value;
rulesList[rule].torrentParams.use_auto_tmm = false; rulesList[rule].torrentParams.use_auto_tmm = false;
} }
else {
rulesList[rule].torrentParams.save_path = "";
}
switch ($('addPausedCombobox').value) { switch ($('addPausedCombobox').value) {
case 'default': case 'default':
@ -746,13 +749,13 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
$('lastMatchText').textContent = 'QBT_TR(Last Match: Unknown)QBT_TR[CONTEXT=AutomatedRssDownloader]'; $('lastMatchText').textContent = 'QBT_TR(Last Match: Unknown)QBT_TR[CONTEXT=AutomatedRssDownloader]';
} }
if (rulesList[ruleName].torrentParams.stopped === null) if ((rulesList[ruleName].torrentParams.stopped === undefined) || (rulesList[ruleName].torrentParams.stopped === null))
$('addPausedCombobox').value = 'default'; $("addStoppedCombobox").value = "default";
else else
$('addPausedCombobox').value = rulesList[ruleName].torrentParams.stopped ? 'always' : 'never'; $('addPausedCombobox').value = rulesList[ruleName].torrentParams.stopped ? 'always' : 'never';
if (rulesList[ruleName].torrentParams.content_layout === null) if ((rulesList[ruleName].torrentParams.content_layout === undefined) || (rulesList[ruleName].torrentParams.content_layout === null))
$('contentLayoutCombobox').value = 'Default'; $("contentLayoutCombobox").value = "Default";
else else
$('contentLayoutCombobox').value = rulesList[ruleName].torrentParams.content_layout; $('contentLayoutCombobox').value = rulesList[ruleName].torrentParams.content_layout;