MediaShelf/mediashelf
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
..
migrations Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
providers Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
static Fix false "Plex fallback" banner during the first scan 2026-09-10 14:30:09 +00:00
templates Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
__init__.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
api.py Fix false "Plex fallback" banner during the first scan 2026-09-10 14:30:09 +00:00
app.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
cli.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
config.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
db.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
ingest.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
keeps.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
queries.py Fix false "Plex fallback" banner during the first scan 2026-09-10 14:30:09 +00:00
rules.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
scanner.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
scoring.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00
web.py Implement MediaShelf v1 2026-09-07 14:59:03 +00:00