This commit is contained in:
ponzischeme89
2026-08-17 07:34:23 +12:00
parent 93fb0fd728
commit 36cb1324fd
56 changed files with 1177 additions and 168 deletions
+25
View File
@@ -1339,6 +1339,31 @@ pays DNS, TCP, TLS and Emby's file open. Pre-warming that connection is the open
opportunity. Two things that look like causes and are not: the subtitle auto-selection
costs 20200 ms, not seconds, and the seek itself is about 900 ms.
**Playback position has one ordered exit path.** Ten-second progress updates, pause/seek
updates and the final Stop all pass through `EmbyRepository`'s `playbackReportMutex`, so a
slow older Progress request cannot complete after Stop and move Emby's saved playhead back.
`PlaybackStopWorker.enqueue` still writes the final position to WorkManager first, but also
sends it immediately from the repository's process scope — leaving the activity no longer
means waiting for WorkManager before Emby Web can resume at the right frame. A successful
immediate delivery cancels that exact fallback request, not the unique work name, because a
newer stop for the same playback session may already have replaced it. The worker drops a
report after 60 seconds: a late retry overwriting progress made in another Emby client is
worse than losing an old fallback. `PlaybackStopWorkerTest` pins that freshness boundary.
**Playback keeps the selected title visible while it starts.** The launcher hands
`PlayerActivity` the backdrop it already has, and `player_loading.xml` holds that artwork
under a dark wash rather than replacing it with an almost-black field. This is intent
metadata, not another playback-path request; it is saved across recreation and replaced by
the next episode's landscape artwork during auto-advance. On the station-style pre-roll, a
television episode replaces the Memby mark at top-left with the programme's own logo and
puts its episode code and title directly beneath it. The same hierarchy is repeated by the
five-second ident once the first frame lands. `seriesName` and `episodeCode` travel with the
resolved `Playable`; a missing or failed logo falls back to the series name instead of
leaving an empty corner. `PrerollScreenshotTest` and `PlaybackIdentityScreenshotTest`
record the pre-roll, the first-frame ident and the backdrop loading state under
`build/screenshots/sonarr-preroll/`, `build/screenshots/playback-identity/` and
`build/screenshots/playback-loading/`.
**The local Memby preroll is prepared while Home is idle.** `PrerollPreloader` owns one
process-scoped ExoPlayer for `res/raw/emby_preroll.mp4`; `MembyApp` queues its first prepare
on the main queue's idle handler, so decoder construction and the local resource read never