WebUI: use native function to convert to numbers

Also replace `parseInt()` since `Number()` behavior is more intuitive.

PR #21831.
This commit is contained in:
Chocobo1
2024-11-16 15:41:20 +08:00
committed by GitHub
parent ede08f3845
commit f73f31619d
14 changed files with 77 additions and 76 deletions

View File

@@ -595,7 +595,7 @@ 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].ignoreDays = parseInt($("ignoreDaysValue").value, 10);
rulesList[rule].ignoreDays = Number($("ignoreDaysValue").value);
rulesList[rule].affectedFeeds = [...rssDownloaderFeedSelectionTable.getRowValues()]
.filter((row) => row.full_data.checked)
.map((row) => row.full_data.url);