simplify queue ops, handle broken pipe errors

- Add OSError errno 32 (broken pipe) handling in progress broadcast
- Remove progress service calls from add/clear queue operations
- Add pending_by_episode cleanup on clear
- Update tests accordingly
This commit is contained in:
2026-06-26 19:50:13 +02:00
parent 5028d4ea27
commit d00e80e240
5 changed files with 44 additions and 51 deletions

View File

@@ -1,19 +1,3 @@
### Task 11: Fix `Resume Queue` API Test
**Test Result:** FAIL — Expected status: 200, got 405 (Method Not Allowed)
**File:** `tests/robot/api/download.robot` and `src/server/api/download.py`
**Instructions:**
The test calls POST `/api/queue/resume`, but this endpoint does not exist. Open `src/server/api/download.py`. There is `/queue/start`, `/queue/stop`, and `/queue/pause`, but no `/queue/resume`. Either add a `POST /queue/resume` endpoint that aliases to `start_queue`, or update the Robot test to call `/queue/start` instead of `/queue/resume`. Ensure the test and API agree.
---
### Task 12: Fix `Remove Item From Queue` API Test
**Test Result:** FAIL — Expected status: 201, got 422 (caused by Add To Queue failing)
**File:** `tests/robot/api/download.robot`
**Instructions:**
This test depends on `Add To Queue` working first. Fix Task 9 (`Add Episodes To Queue`) so items can be added. Then verify that the `DELETE /api/queue/item/{item_id}` endpoint in `src/server/api/download.py` works correctly and returns 200.
---
### Task 13: Fix `Retry Failed Item` API Test
**Test Result:** FAIL — Expected status: 200, got 400
**File:** `tests/robot/api/download.robot`