mirror of
https://github.com/screentinker/screentinker.git
synced 2026-08-14 06:16:20 -06:00
A screen kept showing a YouTube video after its playlist was reassigned, and kept showing it after "no playlist" was selected. Restarting the app showed the new content immediately, which ruled out the network, the download and the server payload. Two faults met: 1. Nothing ever ended a YouTube item. playCurrentItem armed an advance only for images and widgets; video/youtube is neither, and it is played by loading an embed into a WebView, which reports no completion. playYoutube even took the item's durationSec and never read it. So any playlist containing a YouTube item stopped rotating at that item permanently — broader than what was reported. The web and Tizen players both already time YouTube off its duration; Android was the only player that did not, so this brings it back in line. 2. #157 defers a playlist change when the item on screen is dropped from the new list, applying it at the next natural advance. With no advance ever coming, the change was stranded. An EMPTY new list went down the same path, so "no playlist" — the one action that should always take effect immediately — was deferred too. Fixed all three layers: video/youtube now ends on a timer (ItemTiming), an empty list is never deferred (PendingSwap), and a deferral gets a 60s deadline so no future item type that ends on a callback can strand a swap again. Local and remote video stay off the timer path, where STATE_ENDED drives them, so clips are not cut short. The deferral rule and the timing rule are pure seams, tested without a device: 126 Android JVM tests. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uaeo9MvzKoyXuN6ZsbhtkL |
||
|---|---|---|
| .. | ||
| src | ||
| build.gradle.kts | ||
| proguard-rules.pro | ||