jellyfin-qbittorrent-monitor: fix upload

This commit is contained in:
2026-02-17 14:00:05 -05:00
parent d46ccc8245
commit 7484a11535
2 changed files with 4 additions and 5 deletions

View File

@@ -356,7 +356,7 @@ class JellyfinQBittorrentMonitor:
elif desired_state == "throttled":
action = (
"set alt limits "
f"dl={int(remaining_kbs)}KB/s ul=1KB/s, enable alt speed"
f"dl={int(remaining_kbs)}KB/s ul={int(remaining_kbs)}KB/s, enable alt speed"
)
else:
action = "pause torrents"
@@ -380,7 +380,7 @@ class JellyfinQBittorrentMonitor:
if self.torrents_paused:
self.resume_all_torrents()
self.torrents_paused = False
self.set_alt_speed_limits(remaining_kbs, 1)
self.set_alt_speed_limits(remaining_kbs, remaining_kbs)
self.use_alt_limits(True)
else:
if not self.torrents_paused:

View File

@@ -287,10 +287,9 @@ pkgs.testers.runNixOSTest {
assert is_throttled(), "Should be in alt speed mode during streaming"
dl_limit = get_alt_dl_limit()
ul_limit = get_alt_up_limit()
# Upload should be minimal (1 KB/s = 1024 bytes/s)
assert ul_limit == 1024, f"Upload limit should be 1024 bytes/s, got {ul_limit}"
# Download limit should be > 0 (budget not exhausted for a single stream)
# Both upload and download should get remaining bandwidth (proportional)
assert dl_limit > 0, f"Download limit should be > 0, got {dl_limit}"
assert ul_limit == dl_limit, f"Upload limit ({ul_limit}) should equal download limit ({dl_limit})"
# Stop playback
playback_stop = {