Files
Aniworld/tests/unit
Lukas 04f26d5cfc fix: Correct series filter logic for no_episodes
Critical bug fix: The filter was returning the wrong series because of
a misunderstanding of the episode table semantics.

ISSUE:
- Episodes table contains MISSING episodes (from episodeDict)
- is_downloaded=False means episode file not found in folder
- Original query logic was backwards - returned series with NO missing
  episodes instead of series WITH missing episodes

SOLUTION:
- Simplified query to directly check for episodes with is_downloaded=False
- Changed from complex join with count aggregation to simple subquery
- Now correctly returns series that have at least one undownloaded episode

CHANGES:
- src/server/database/service.py: Rewrote get_series_with_no_episodes()
  method with corrected logic and clearer documentation
- tests/unit/test_series_filter.py: Updated test expectations to match
  corrected behavior with detailed comments explaining episode semantics
- docs/API.md: Enhanced documentation explaining filter behavior and
  episode table meaning

TESTS:
All 5 unit tests pass with corrected logic
2026-01-23 19:14:36 +01:00
..
2025-12-04 19:22:42 +01:00
2025-12-10 21:12:34 +01:00
2025-12-10 21:12:34 +01:00
2025-12-04 19:22:42 +01:00
2025-10-23 19:00:49 +02:00
2025-10-22 09:20:35 +02:00
2025-11-19 21:20:22 +01:00
2025-10-22 09:20:35 +02:00