Add ability to control Deluge's upload and download speeds based on Jellyfin streams.

This commit is contained in:
2026-04-20 20:30:43 +10:00
parent 758e4ea9a4
commit 1b3b4ab4ef
4 changed files with 250 additions and 0 deletions

23
templates/deluge.php Normal file
View File

@@ -0,0 +1,23 @@
<?= snippet("header") ?>
<?= snippet("page/title") ?>
<div class="container">
<p><strong>Current Streams</strong>: <?= $page->currentStreams() ?></p>
<?php if ($page->currentStreams()->toInt() > 0) : ?>
<p><strong>Last Seen</strong>: <?= date('l \t\h\e\ jS \of F Y \a\t g:ia', $page->lastSeen()->toInt()) ?></p>
<?php endif ?>
</div>
<div class="row mb-3">
<div class="d-grid gap-2 col-6 mx-auto">
<a class="btn btn-primary" href="?s=update" role="button">Update</a>
<a class="btn btn-warning" href="?s=reset" role="button">Reset</a>
</div>
<div class="d-grid gap-2 col-6 mx-auto">
<a class="btn btn-danger" href="?s=inc" role="button">Increment Streams</a>
<a class="btn btn-danger" href="?s=dec" role="button">Decrement Streams</a>
</div>
</div>
<?= snippet("footer") ?>