mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
WebUI: prefer prefix increment operator
Some checks failed
cpp.yaml / WebUI: prefer prefix increment operator (push) Failing after 0s
js.yaml / WebUI: prefer prefix increment operator (push) Failing after 0s
CI - File health / Check (push) Has been cancelled
CI - macOS / Build (push) Has been cancelled
CI - Ubuntu / Build (push) Has been cancelled
CI - Python / Check (push) Has been cancelled
CI - WebUI / Check (push) Has been cancelled
CI - Windows / Build (push) Has been cancelled
Some checks failed
cpp.yaml / WebUI: prefer prefix increment operator (push) Failing after 0s
js.yaml / WebUI: prefer prefix increment operator (push) Failing after 0s
CI - File health / Check (push) Has been cancelled
CI - macOS / Build (push) Has been cancelled
CI - Ubuntu / Build (push) Has been cancelled
CI - Python / Check (push) Has been cancelled
CI - WebUI / Check (push) Has been cancelled
CI - Windows / Build (push) Has been cancelled
Adhere to coding style. PR #23076.
This commit is contained in:
parent
d6672abb94
commit
7a1a214f73
6 changed files with 14 additions and 14 deletions
|
@ -263,7 +263,7 @@
|
||||||
|
|
||||||
// Adjust file enumeration count by 1 when replacing single files to prevent naming conflicts
|
// Adjust file enumeration count by 1 when replacing single files to prevent naming conflicts
|
||||||
if (!fileRenamer.replaceAll) {
|
if (!fileRenamer.replaceAll) {
|
||||||
fileRenamer.fileEnumerationStart++;
|
++fileRenamer.fileEnumerationStart;
|
||||||
document.getElementById("file_counter").value = fileRenamer.fileEnumerationStart;
|
document.getElementById("file_counter").value = fileRenamer.fileEnumerationStart;
|
||||||
}
|
}
|
||||||
setupTable(selectedRows);
|
setupTable(selectedRows);
|
||||||
|
|
|
@ -82,7 +82,7 @@ window.qBittorrent.MonkeyPatch ??= (() => {
|
||||||
else if (MUI.files[source] === "loading") {
|
else if (MUI.files[source] === "loading") {
|
||||||
let tries = 0;
|
let tries = 0;
|
||||||
const checker = (function() {
|
const checker = (function() {
|
||||||
tries++;
|
++tries;
|
||||||
if ((MUI.files[source] === "loading") && (tries < "100"))
|
if ((MUI.files[source] === "loading") && (tries < "100"))
|
||||||
return;
|
return;
|
||||||
$clear(checker);
|
$clear(checker);
|
||||||
|
|
|
@ -89,7 +89,7 @@ window.qBittorrent.MultiRename ??= (() => {
|
||||||
// Don't replace escape chars when they don't precede the current search being performed
|
// Don't replace escape chars when they don't precede the current search being performed
|
||||||
if (input.substring(i + escape.length, i + escape.length + search.length) !== search) {
|
if (input.substring(i + escape.length, i + escape.length + search.length) !== search) {
|
||||||
result += input[i];
|
result += input[i];
|
||||||
i++;
|
++i;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Replace escape chars when they precede the current search being performed, unless explicitly told not to
|
// Replace escape chars when they precede the current search being performed, unless explicitly told not to
|
||||||
|
@ -110,7 +110,7 @@ window.qBittorrent.MultiRename ??= (() => {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
result += input[i];
|
result += input[i];
|
||||||
i++;
|
++i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -2205,7 +2205,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||||
|
|
||||||
const updateWebuiLocaleSelect = (selected) => {
|
const updateWebuiLocaleSelect = (selected) => {
|
||||||
const languages = [];
|
const languages = [];
|
||||||
for (let i = 0; i < document.getElementById("locale_select").options.length; i++)
|
for (let i = 0; i < document.getElementById("locale_select").options.length; ++i)
|
||||||
languages.push(document.getElementById("locale_select").options[i].value);
|
languages.push(document.getElementById("locale_select").options[i].value);
|
||||||
|
|
||||||
if (!languages.includes(selected)) {
|
if (!languages.includes(selected)) {
|
||||||
|
|
|
@ -384,7 +384,6 @@
|
||||||
|
|
||||||
const showRssFeed = (path) => {
|
const showRssFeed = (path) => {
|
||||||
rssArticleTable.clear();
|
rssArticleTable.clear();
|
||||||
let rowCount = 0;
|
|
||||||
|
|
||||||
const childFeeds = new Set();
|
const childFeeds = new Set();
|
||||||
for (const row of rssFeedTable.getRowValues()) {
|
for (const row of rssFeedTable.getRowValues()) {
|
||||||
|
@ -406,10 +405,11 @@
|
||||||
if (path === "")
|
if (path === "")
|
||||||
visibleArticles = visibleArticles.filter((a) => !a.isRead);
|
visibleArticles = visibleArticles.filter((a) => !a.isRead);
|
||||||
|
|
||||||
|
let rowID = -1;
|
||||||
visibleArticles.sort((e1, e2) => new Date(e2.date) - new Date(e1.date))
|
visibleArticles.sort((e1, e2) => new Date(e2.date) - new Date(e1.date))
|
||||||
.each((torrentEntry) => {
|
.each((torrentEntry) => {
|
||||||
rssArticleTable.updateRowData({
|
rssArticleTable.updateRowData({
|
||||||
rowId: rowCount++,
|
rowId: ++rowID,
|
||||||
name: torrentEntry.title,
|
name: torrentEntry.title,
|
||||||
link: torrentEntry.link,
|
link: torrentEntry.link,
|
||||||
torrentURL: torrentEntry.torrentURL,
|
torrentURL: torrentEntry.torrentURL,
|
||||||
|
|
|
@ -494,12 +494,12 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
|
||||||
const responseJSON = await response.json();
|
const responseJSON = await response.json();
|
||||||
|
|
||||||
rssDownloaderRulesTable.clear();
|
rssDownloaderRulesTable.clear();
|
||||||
let rowCount = 0;
|
let rowID = -1;
|
||||||
for (const rule in responseJSON) {
|
for (const rule in responseJSON) {
|
||||||
if (!Object.hasOwn(responseJSON, rule))
|
if (!Object.hasOwn(responseJSON, rule))
|
||||||
continue;
|
continue;
|
||||||
rssDownloaderRulesTable.updateRowData({
|
rssDownloaderRulesTable.updateRowData({
|
||||||
rowId: rowCount++,
|
rowId: ++rowID,
|
||||||
checked: responseJSON[rule].enabled,
|
checked: responseJSON[rule].enabled,
|
||||||
name: rule
|
name: rule
|
||||||
});
|
});
|
||||||
|
@ -677,18 +677,18 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
|
||||||
const responseJSON = await response.json();
|
const responseJSON = await response.json();
|
||||||
|
|
||||||
rssDownloaderArticlesTable.clear();
|
rssDownloaderArticlesTable.clear();
|
||||||
let rowCount = 0;
|
let rowID = -1;
|
||||||
for (const feed in responseJSON) {
|
for (const feed in responseJSON) {
|
||||||
if (!Object.hasOwn(responseJSON, feed))
|
if (!Object.hasOwn(responseJSON, feed))
|
||||||
continue;
|
continue;
|
||||||
rssDownloaderArticlesTable.updateRowData({
|
rssDownloaderArticlesTable.updateRowData({
|
||||||
rowId: rowCount++,
|
rowId: ++rowID,
|
||||||
name: feed,
|
name: feed,
|
||||||
isFeed: true
|
isFeed: true
|
||||||
});
|
});
|
||||||
responseJSON[feed].each((article) => {
|
responseJSON[feed].each((article) => {
|
||||||
rssDownloaderArticlesTable.updateRowData({
|
rssDownloaderArticlesTable.updateRowData({
|
||||||
rowId: rowCount++,
|
rowId: ++rowID,
|
||||||
name: article,
|
name: article,
|
||||||
isFeed: false
|
isFeed: false
|
||||||
});
|
});
|
||||||
|
@ -788,10 +788,10 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
|
||||||
setElementTitles();
|
setElementTitles();
|
||||||
|
|
||||||
rssDownloaderFeedSelectionTable.clear();
|
rssDownloaderFeedSelectionTable.clear();
|
||||||
let rowCount = 0;
|
let rowID = -1;
|
||||||
feedList.forEach((feed) => {
|
feedList.forEach((feed) => {
|
||||||
rssDownloaderFeedSelectionTable.updateRowData({
|
rssDownloaderFeedSelectionTable.updateRowData({
|
||||||
rowId: rowCount++,
|
rowId: ++rowID,
|
||||||
checked: rulesList[ruleName].affectedFeeds.contains(feed.url),
|
checked: rulesList[ruleName].affectedFeeds.contains(feed.url),
|
||||||
name: feed.name,
|
name: feed.name,
|
||||||
url: feed.url
|
url: feed.url
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue