Fix: Remove episodes from missing list on download/rescan

- Update _update_series_in_db to sync missing episodes bidirectionally
- Add delete_by_series_and_episode method to EpisodeService
- Remove downloaded episodes from DB after successful download
- Clear anime service cache when episodes are removed
- Fix tests to use 'message' instead of 'detail' in API responses
- Mock DB operations in rescan tests
This commit is contained in:
2025-12-15 16:17:34 +01:00
parent bf332f27e0
commit 4c9bf6b982
8 changed files with 182 additions and 33 deletions

View File

@@ -220,7 +220,8 @@ class TestDownloadFlowEndToEnd:
assert response.status_code == 400
data = response.json()
assert "detail" in data
# API returns 'message' for error responses
assert "message" in data
async def test_validation_error_for_invalid_priority(self, authenticated_client):
"""Test validation error for invalid priority level."""