fix: resolve media detail from sessions when lifetime summary is absent

- Change `getMediaDetail` JOIN to LEFT JOIN on `imm_lifetime_media` and fall back to aggregated session metrics when no lifetime row exists
- Add filter `AND (lm.video_id IS NOT NULL OR s.session_id IS NOT NULL)` to keep results valid
- Add regression test covering the session-visible / media-detail-missing mismatch
This commit is contained in:
2026-05-11 23:52:56 -07:00
parent 27be0e6fd7
commit 6e666d7ca5
4 changed files with 130 additions and 6 deletions
+4
View File
@@ -0,0 +1,4 @@
type: fixed
area: stats
- Fixed recent session detail pages showing "Media not found" before lifetime media summaries are available.