@ -577,41 +577,41 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
@@ -577,41 +577,41 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
rulesList[rule].mustNotContain = $('mustNotContainText').value;
rulesList[rule].episodeFilter = $('episodeFilterText').value;
rulesList[rule].smartFilter = $('useSmartFilter').checked;
rulesList[rule].assignedCategory = $('assignCategoryCombobox').value;
rulesList[rule].savePath = $('savetoDifferentDir').checked ? $('saveToText').value : '';
rulesList[rule].ignoreDays = parseInt($('ignoreDaysValue').value);
rulesList[rule].affectedFeeds = rssDownloaderFeedSelectionTable.rows.filter((row) => row.full_data.checked)
.map((row) => row.full_data.url)
.getValues();
rulesList[rule].torrentParams.category = $('assignCategoryCombobox').value;
rulesList[rule].torrentParams.save_path = $('savetoDifferentDir').checked ? $('saveToText').value : '';
switch ($('addPausedCombobox').value) {
case 'default':
rulesList[rule].addPaused = null;
rulesList[rule].torrentParams.stopp ed = null;
break;
case 'always':
rulesList[rule].addPaus ed = true;
rulesList[rule].torrentParams.stopp ed = true;
break;
case 'never':
rulesList[rule].addPaus ed = false;
rulesList[rule].torrentParams.stopp ed = false;
break;
}
switch ($('contentLayoutCombobox').value) {
case 'Default':
rulesList[rule].torrentContentL ayout = null;
rulesList[rule].torrentParams.content_l ayout = null;
break;
case 'Original':
rulesList[rule].torrentContentL ayout = 'Original';
rulesList[rule].torrentParams.content_l ayout = 'Original';
break;
case 'Subfolder':
rulesList[rule].torrentContentL ayout = 'Subfolder';
rulesList[rule].torrentParams.content_l ayout = 'Subfolder';
break;
case 'NoSubfolder':
rulesList[rule].torrentContentL ayout = 'NoSubfolder';
rulesList[rule].torrentParams.content_l ayout = 'NoSubfolder';
break;
}
rulesList[rule].affectedFeeds = rssDownloaderFeedSelectionTable.rows.filter((row) => row.full_data.checked)
.map((row) => row.full_data.url)
.getValues();
new Request({
url: 'api/v2/rss/setRule',
noCache: true,
@ -702,8 +702,8 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
@@ -702,8 +702,8 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
$('useSmartFilter').disabled = false;
$('assignCategoryCombobox').disabled = false;
$('savetoDifferentDir').disabled = false;
$('savetoDifferentDir').checked = rulesList[ruleName].saveP ath ? false : true;
$('saveToText').disabled = rulesList[ruleName].saveP ath ? false : true;
$('savetoDifferentDir').checked = rulesList[ruleName].torrentParams.save_p ath ? false : true;
$('saveToText').disabled = rulesList[ruleName].torrentParams.save_p ath ? false : true;
$('ignoreDaysValue').disabled = false;
$('addPausedCombobox').disabled = false;
$('contentLayoutCombobox').disabled = false;
@ -715,9 +715,9 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
@@ -715,9 +715,9 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
$('episodeFilterText').value = rulesList[ruleName].episodeFilter;
$('useSmartFilter').checked = rulesList[ruleName].smartFilter;
$('assignCategoryCombobox').value = rulesList[ruleName].assignedCategory ? rulesList[ruleName].assignedC ategory : 'default';
$('savetoDifferentDir').checked = rulesList[ruleName].saveP ath !== '';
$('saveToText').value = rulesList[ruleName].saveP ath;
$('assignCategoryCombobox').value = rulesList[ruleName].torrentParams.category ? rulesList[ruleName].torrentParams.c ategory : 'default';
$('savetoDifferentDir').checked = rulesList[ruleName].torrentParams.save_p ath !== '';
$('saveToText').value = rulesList[ruleName].torrentParams.save_p ath;
$('ignoreDaysValue').value = rulesList[ruleName].ignoreDays;
// calculate days since last match
@ -730,15 +730,15 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
@@ -730,15 +730,15 @@ 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]';
}
if (rulesList[ruleName].addPaus ed === null)
if (rulesList[ruleName].torrentParams.stopp ed === null)
$('addPausedCombobox').value = 'default';
else
$('addPausedCombobox').value = rulesList[ruleName].addPaus ed ? 'always' : 'never';
$('addPausedCombobox').value = rulesList[ruleName].torrentParams.stopp ed ? 'always' : 'never';
if (rulesList[ruleName].torrentContentL ayout === null)
if (rulesList[ruleName].torrentParams.content_l ayout === null)
$('contentLayoutCombobox').value = 'Default';
else
$('contentLayoutCombobox').value = rulesList[ruleName].torrentContentL ayout;
$('contentLayoutCombobox').value = rulesList[ruleName].torrentParams.content_l ayout;
setElementTitles();