This commit is contained in:
bolshoytoster 2025-05-31 21:07:23 +01:00
commit f3e90314ea

View file

@ -75,9 +75,7 @@ window.qBittorrent.Client ??= (() => {
const getSyncMainDataInterval = () => {
return document.hidden
? window.qBittorrent.Cache.preferences.get().web_ui_session_timeout * 500
: customSyncMainDataInterval
? customSyncMainDataInterval
: serverSyncMainDataInterval;
: customSyncMainDataInterval ? customSyncMainDataInterval : serverSyncMainDataInterval;
};
let stopped = false;
@ -958,7 +956,8 @@ window.addEventListener("DOMContentLoaded", (event) => {
if (fullUpdate)
// re-select previously selected rows
torrentsTable.reselectRows(torrentsTableSelectedRows);
} else if (response.status === 403) {
}
else if (response.status === 403) {
const errorDiv = document.getElementById("error_div");
if (errorDiv)
errorDiv.textContent = "QBT_TR(You've been logged out)QBT_TR[CONTEXT=HttpServer]";
@ -974,8 +973,8 @@ window.addEventListener("DOMContentLoaded", (event) => {
syncRequestInProgress = false;
syncData(
document.hidden
? window.qBittorrent.Cache.preferences.get().web_ui_session_timeout * 500
: 2000
? window.qBittorrent.Cache.preferences.get().web_ui_session_timeout * 500
: 2000
);
});
};