adding scheduler slots
Build and Deploy (internal) / Build Transmission Manager Image (push) Successful in 2m20s
Build and Deploy (internal) / Deploy Transmission Manager (internal) (push) Successful in 3s

This commit is contained in:
2026-09-23 18:32:32 -03:00
parent c98af34202
commit 0d686847f2
5 changed files with 37 additions and 10 deletions
+3 -3
View File
@@ -313,7 +313,7 @@ function renderScheduler() {
$("#scheduler-empty").classList.toggle("hidden", items.length > 0);
const active = items.filter((item) => item.active).length;
const optedIn = items.filter((item) => item.optedIn).length;
setText($("#scheduler-count"), `${active} active · ${optedIn} opted in`);
setText($("#scheduler-count"), `${active} / ${schedulerData.maxActive} active slots · ${optedIn} opted in`);
}
function renderSchedulerHistory() {
@@ -387,7 +387,7 @@ async function setSchedulerSlots(value) {
method: "POST", headers: { "Content-Type": "application/json" },
body: JSON.stringify({ maxActive: value }),
});
setText($("#scheduler-feedback"), "Seed slots saved.");
setText($("#scheduler-feedback"), "Active slots saved.");
schedulerError = "";
await loadScheduler();
} catch (err) {
@@ -892,7 +892,7 @@ function wireEvents() {
event.preventDefault();
const value = Number($("#scheduler-slots").value);
if (!Number.isInteger(value) || value < 1 || value > 100) {
schedulerError = "Seed slots must be a whole number from 1 to 100.";
schedulerError = "Active slots must be a whole number from 1 to 100.";
renderScheduler();
return;
}
+2 -2
View File
@@ -115,10 +115,10 @@
<div class="scheduler-heading">
<div>
<h2>Seed scheduler</h2>
<p>Completed torrents take turns when a scheduled seed has not uploaded for one hour.</p>
<p>Opted-in completed torrents share the active slots and rotate after one hour without upload. Other torrents remain under Transmission's control.</p>
</div>
<form id="scheduler-settings" class="scheduler-settings">
<label for="scheduler-slots">Seed slots</label>
<label for="scheduler-slots">Active slots</label>
<input id="scheduler-slots" type="number" min="1" max="100" value="1" required />
<button type="submit" class="scheduler-button">Save</button>
</form>