jellyfin-qbittorrent-monitor: cleanup
This commit is contained in:
@@ -243,9 +243,9 @@ pkgs.testers.runNixOSTest {
|
||||
systemd-run --unit=jellyfin-qbittorrent-monitor-test \\
|
||||
--setenv=JELLYFIN_URL=http://localhost:8096 \\
|
||||
--setenv=QBITTORRENT_URL=http://localhost:8080 \\
|
||||
--setenv=CHECK_INTERVAL=2 \\
|
||||
--setenv=STREAMING_START_DELAY=2 \\
|
||||
--setenv=STREAMING_STOP_DELAY=3 \\
|
||||
--setenv=CHECK_INTERVAL=1 \\
|
||||
--setenv=STREAMING_START_DELAY=1 \\
|
||||
--setenv=STREAMING_STOP_DELAY=1 \\
|
||||
{python_path} {monitor_path}
|
||||
""")
|
||||
|
||||
@@ -265,7 +265,7 @@ pkgs.testers.runNixOSTest {
|
||||
|
||||
# Set streaming state
|
||||
set_jellyfin_state(streaming=True, paused=is_paused, local=is_local, media_type=media_type)
|
||||
time.sleep(6) # Wait for monitor to detect and apply changes
|
||||
time.sleep(1.5) # Wait for monitor to detect and apply changes
|
||||
|
||||
throttling_active = get_throttling_state()
|
||||
|
||||
@@ -286,23 +286,23 @@ pkgs.testers.runNixOSTest {
|
||||
assert not throttling_active, f"Expected no throttling for {media_type}, {'paused' if is_paused else 'playing'}, {'local' if is_local else 'external'}"
|
||||
|
||||
set_jellyfin_state(streaming=False)
|
||||
time.sleep(7) # Wait for stop delay
|
||||
time.sleep(1.5) # Wait for stop delay
|
||||
|
||||
assert not get_throttling_state(), "No streaming should disable throttling"
|
||||
|
||||
# Start with throttling-enabled state
|
||||
set_jellyfin_state(streaming=True, paused=False, local=False, media_type="Movie")
|
||||
time.sleep(6)
|
||||
time.sleep(1.5)
|
||||
assert get_throttling_state(), "Should enable throttling for external Movie"
|
||||
|
||||
# Switch to paused (should disable throttling)
|
||||
set_jellyfin_state(streaming=True, paused=True, local=False, media_type="Movie")
|
||||
time.sleep(6)
|
||||
time.sleep(1.5)
|
||||
assert not get_throttling_state(), "Should disable throttling when paused"
|
||||
|
||||
# Switch back to playing (should re-enable throttling)
|
||||
set_jellyfin_state(streaming=True, paused=False, local=False, media_type="Movie")
|
||||
time.sleep(6)
|
||||
time.sleep(1.5)
|
||||
assert get_throttling_state(), "Should re-enable throttling when unpaused"
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user