A test that holds the Drive-In fix: the slot match moved into shownPlan
release-gate / verify (push) Successful in 11m51s
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 3m12s
pauljd/davidson-ci: Davidson CI / ai-review (push) Failing after 3m3s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 21:36:55 +00:00
co-authored by Claude Opus 5.5
parent b9697bfd81
commit 5b5b613b6b
3 changed files with 27 additions and 2 deletions
@@ -172,7 +172,7 @@ internal fun ScheduledChannelPlayer(session: EmbySampleSession, channel: SampleC
catch (_: Exception) { problem = if (channel is ScheduledChannel) "This programme isn't available right now. Orbit moves on at ${clock(current.endMs)}." else "This scheduled programme could not be opened. Return to the guide and try again." }
}
// Suppress the preceding plan immediately at a boundary while the effect schedules its replacement.
val plan = loadedNow?.plan ?: prepared?.takeIf { (it.item.id == current.media.item.id || preparedFor == current.media.item.id) && preparedSlot == current.startMs && problem == null }
val plan = loadedNow?.plan ?: shownPlan(prepared, preparedFor, preparedSlot, current, problem)
// The ident playing out, held on its last frame until the next programme's first picture is on screen.
var heldIdent by remember(channel) { mutableStateOf<SampleBroadcast?>(null) }
// The block's ident chosen at the changeover, kept with the held ident so its length and overlay stay the same throughout.
@@ -294,3 +294,11 @@ internal fun ClassicTuningNumber(number: Int, modifier: Modifier = Modifier) {
style = androidx.compose.ui.text.TextStyle(shadow = androidx.compose.ui.graphics.Shadow(
Color.Black, androidx.compose.ui.geometry.Offset(2f, 2f), 2f)))
}
/**
* The prepared programme to show, if it's this slot's: the booked file itself, or a copy found again under a new number for
* it (re-filed after a rescan, 15 November 2026), and only when nothing went wrong.
*/
internal fun shownPlan(prepared: EmbyPlaybackPlan?, preparedFor: String?, preparedSlot: Long?, current: SampleBroadcast, problem: String?): EmbyPlaybackPlan? =
prepared?.takeIf { (it.item.id == current.media.item.id || preparedFor == current.media.item.id) && preparedSlot == current.startMs && problem == null }