MediaShelf/tests
Jess Hallsworth 71cfa31f09
Fix false "Plex fallback" banner during the first scan
history_coverage is only written at the end of an ingest, but
has_completion_data was reading from it. During the first scan the coverage
table is empty while watch_event already holds tens of thousands of Tautulli
rows, so the dashboard announced a fallback that had not happened and claimed
the rejection component was disabled when it was not.

The flag now comes from the events themselves — does any row carry a
percent_complete — which is true the moment Tautulli rows land and false for
Plex-only history. history_source falls back to the scan record when coverage
is absent, so it reads "tautulli" mid-scan instead of null.

Also: the banner named Plex as the source without checking, and now reports
whichever source is actually active, and stays quiet while a scan is running
since the counts are still moving.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GVbG48GAXfCZatcmX123Ra
2026-09-10 14:30:09 +00:00
..
__init__.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
conftest.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
test_ingest.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
test_keeps.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
test_packaging.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
test_rules_and_api.py Fix false "Plex fallback" banner during the first scan 2026-09-10 14:30:09 +00:00
test_scoring.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00