goon/app/models
jtrzupek c154deab37 feat(sources): 0-5★ ranking on Sites (freshness/metadata/plays) + playback telemetry
Rates each source on three axes the user asked for:
- freshness: how recently/often new content arrives (newest age + 7d volume)
- richness: metadata coverage (thumbnail/tags/performers/description/studio/duration)
- plays: does it actually play — from real playback telemetry when available,
  else a proxy from the resolve mechanism. 0★ = offline (gates the overall stars,
  so a fresh+rich source that doesn't play still ranks bottom — the hqfap/4k69 case)

Backend:
- playback_events: fire-and-forget telemetry POST from the app per playback attempt
  (origin + success/error + time-to-first-frame), append-only, 30d retention
- source_stats: per-origin computed scores, refreshed by a scheduler job (6h);
  /sources joins it and sorts by stars
- models + local migration 0025; new GOON_SCHED_SOURCE_STATS_HOURS setting

Mobile:
- Sites rows show ★ rating; tap the stars for a breakdown (axes + metadata %, plus
  whether "plays" is measured or estimated)
- PlayerScreen reports playback success/failure per source (native path only —
  symmetric, conservative); origin threaded through Scene/Movie play callsites

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 10:00:59 +02:00
..
__init__.py feat(sources): 0-5★ ranking on Sites (freshness/metadata/plays) + playback telemetry 2026-06-22 10:00:59 +02:00
base.py Initial commit 2026-05-20 10:10:22 +02:00
blacklist.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
bug_report.py feat(bug-reports): two-way replies (device-scoped) + admin reply endpoint 2026-06-12 11:35:44 +02:00
external_record.py Initial commit 2026-05-20 10:10:22 +02:00
favorite_movie.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
favorite_performer.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
favorite_scene.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
favorite_studio.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
ingest_run.py Initial commit 2026-05-20 10:10:22 +02:00
merge_candidate.py Initial commit 2026-05-20 10:10:22 +02:00
movie.py Initial commit 2026-05-20 10:10:22 +02:00
movie_playback_source.py Initial commit 2026-05-20 10:10:22 +02:00
performer.py perf(taxonomy): denormalize scene_count for tags/performers/studios 2026-05-31 17:53:48 +02:00
play_progress.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
playback_event.py feat(sources): 0-5★ ranking on Sites (freshness/metadata/plays) + playback telemetry 2026-06-22 10:00:59 +02:00
playback_source.py Initial commit 2026-05-20 10:10:22 +02:00
saved_search.py feat(api): per-device saved searches (keyword favorites) 2026-06-16 13:52:18 +02:00
scene.py Initial commit 2026-05-20 10:10:22 +02:00
source.py Initial commit 2026-05-20 10:10:22 +02:00
source_stats.py feat(sources): 0-5★ ranking on Sites (freshness/metadata/plays) + playback telemetry 2026-06-22 10:00:59 +02:00
studio.py perf(taxonomy): denormalize scene_count for tags/performers/studios 2026-05-31 17:53:48 +02:00
tag.py perf(taxonomy): denormalize scene_count for tags/performers/studios 2026-05-31 17:53:48 +02:00