mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
WebUI: Fix incorrectly backported changes
This commit is contained in:
parent
ea9f3800ce
commit
48d8a2fbc8
1 changed files with 12 additions and 12 deletions
|
@ -2876,10 +2876,10 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||||
}
|
}
|
||||||
|
|
||||||
// Share Ratio Limiting
|
// Share Ratio Limiting
|
||||||
let maxRatio = -1;
|
let max_ratio = -1;
|
||||||
if (document.getElementById("maxRatioCheckbox").checked) {
|
if (document.getElementById("max_ratio_checkbox").checked) {
|
||||||
maxRatio = Number(document.getElementById("maxRatioValue").value);
|
max_ratio = Number(document.getElementById("max_ratio_value").value);
|
||||||
if (isNaN(maxRatio) || (maxRatio < 0)) {
|
if (isNaN(max_ratio) || (max_ratio < 0)) {
|
||||||
alert("QBT_TR(Share ratio limit must not have a negative value.)QBT_TR[CONTEXT=HttpServer]");
|
alert("QBT_TR(Share ratio limit must not have a negative value.)QBT_TR[CONTEXT=HttpServer]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2887,10 +2887,10 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||||
settings["max_ratio_enabled"] = $("max_ratio_checkbox").checked;
|
settings["max_ratio_enabled"] = $("max_ratio_checkbox").checked;
|
||||||
settings["max_ratio"] = max_ratio;
|
settings["max_ratio"] = max_ratio;
|
||||||
|
|
||||||
let maxSeedingTime = -1;
|
let max_seeding_time = -1;
|
||||||
if (document.getElementById("maxSeedingTimeCheckbox").checked) {
|
if (document.getElementById("max_seeding_time_checkbox").checked) {
|
||||||
maxSeedingTime = Number(document.getElementById("maxSeedingTimeValue").value);
|
max_seeding_time = Number(document.getElementById("max_seeding_time_value").value);
|
||||||
if (Number.isNaN(maxSeedingTime) || (maxSeedingTime < 0)) {
|
if (Number.isNaN(max_seeding_time) || (max_seeding_time < 0)) {
|
||||||
alert("QBT_TR(Seeding time limit must not have a negative value.)QBT_TR[CONTEXT=HttpServer]");
|
alert("QBT_TR(Seeding time limit must not have a negative value.)QBT_TR[CONTEXT=HttpServer]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2899,10 +2899,10 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||||
settings["max_seeding_time"] = max_seeding_time;
|
settings["max_seeding_time"] = max_seeding_time;
|
||||||
settings["max_ratio_act"] = Number($("max_ratio_act").value);
|
settings["max_ratio_act"] = Number($("max_ratio_act").value);
|
||||||
|
|
||||||
let maxInactiveSeedingTime = -1;
|
let max_inactive_seeding_time = -1;
|
||||||
if (document.getElementById("maxInactiveSeedingTimeCheckbox").checked) {
|
if (document.getElementById("max_inactive_seeding_time_checkbox").checked) {
|
||||||
maxInactiveSeedingTime = Number(document.getElementById("maxInactiveSeedingTimeValue").value);
|
max_inactive_seeding_time = Number(document.getElementById("max_inactive_seeding_time_value").value);
|
||||||
if (Number.isNaN(maxInactiveSeedingTime) || (maxInactiveSeedingTime < 0)) {
|
if (Number.isNaN(max_inactive_seeding_time) || (max_inactive_seeding_time < 0)) {
|
||||||
alert("QBT_TR(Seeding time limit must not have a negative value.)QBT_TR[CONTEXT=HttpServer]");
|
alert("QBT_TR(Seeding time limit must not have a negative value.)QBT_TR[CONTEXT=HttpServer]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue