0.108.36: the credits squeeze-back
Paul, 6 November 2026, from the approved design. Over a programme's last minute, before the ident, the picture eases over a second into a frame at the top left (54%), and what's next fills the rest: the channel's logo, Next on <channel> (Keep watching for the same series), a countdown, the next programme's artwork, title and episode, and Later on the channel with the channel's cast member, bobbing and blinking. Then the ident, and the next programme on time. The next programme now starts loading as the squeeze-back begins (72 seconds ahead instead of 12). Not on the Drive-In, not on Tots in the evening, not under ten minutes, not while catching up. Settings > Watching: Squeeze-back and The cast, both on. Instant and still with Reduce motion. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
package tv.orbit.classic
|
||||
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Test
|
||||
import java.time.ZoneId
|
||||
import java.time.ZonedDateTime
|
||||
|
||||
class SqueezeBackTest {
|
||||
private val minute = 60_000L
|
||||
private val london = ZoneId.of("Europe/London")
|
||||
private val noon = ZonedDateTime.of(2026, 11, 6, 12, 0, 0, 0, london).toInstant().toEpochMilli()
|
||||
private val start = noon; private val end = noon + 30 * minute; private val ident = 7_000L
|
||||
|
||||
@Test fun itShowsForTheMinuteBeforeTheIdent() {
|
||||
assertFalse(squeezeBackDue(106, start, end, end, end - ident - SQUEEZE_MS - 1, ident, 0))
|
||||
assertTrue(squeezeBackDue(106, start, end, end, end - ident - SQUEEZE_MS, ident, 0))
|
||||
assertTrue(squeezeBackDue(106, start, end, end, end - ident - 1, ident, 0))
|
||||
// The ident takes over.
|
||||
assertFalse(squeezeBackDue(106, start, end, end, end - ident, ident, 0))
|
||||
// With no ident, right to the end.
|
||||
assertTrue(squeezeBackDue(106, start, end, end, end - 1, 0, 0))
|
||||
}
|
||||
|
||||
@Test fun notWhereItDoesntBelong() {
|
||||
val at = end - ident - 30_000
|
||||
assertFalse(squeezeBackDue(DRIVE_IN_NUMBER, start, end, end, at, ident, 0))
|
||||
assertFalse(squeezeBackDue(106, end - 5 * minute, end, end, at, ident, 0)) // under ten minutes
|
||||
assertFalse(squeezeBackDue(106, start, end, end + minute, at, ident, 0)) // a gap before the next
|
||||
assertFalse(squeezeBackDue(106, start, end, end, at, ident, -3_600_000)) // catching up
|
||||
val evening = ZonedDateTime.of(2026, 11, 6, 19, 0, 0, 0, london).toInstant().toEpochMilli()
|
||||
assertFalse(squeezeBackDue(TOTS_NUMBER, evening, evening + 30 * minute, evening + 30 * minute, evening + 30 * minute - ident - 10_000, ident, 0))
|
||||
assertTrue(squeezeBackDue(TOTS_NUMBER, start, end, end, at, ident, 0))
|
||||
}
|
||||
|
||||
@Test fun theNextProgrammeLoadsFromTheStartOfTheSqueezeBack() {
|
||||
val ahead = SQUEEZE_MS + IDENT_LOAD_AHEAD_MS
|
||||
assertEquals(IdentPhase.LoadNext, identPhase(start, end, end - ident - SQUEEZE_MS, ident, ahead))
|
||||
assertEquals(IdentPhase.None, identPhase(start, end, end - ident - SQUEEZE_MS, ident))
|
||||
}
|
||||
|
||||
@Test fun keepWatchingForTheSameShowAndACastMemberPerChannel() {
|
||||
fun show(title: String, at: Long) = SampleBroadcast(ScheduledMedia(SampleItem(title, "Episode", 30, "", "i$at", 30 * minute), "s$at", 30 * minute), at)
|
||||
assertTrue(keepWatching(show("Fawlty Towers / S1 E3 / The Wedding Party", start), show("Fawlty Towers / S1 E4 / The Hotel Inspectors", end)))
|
||||
assertFalse(keepWatching(show("The X-Files / S1 E1 / Pilot", start), show("Fringe / S1 E1 / Pilot", end)))
|
||||
assertNull(squeezeCast(TOTS_NUMBER)); assertNotNull(squeezeCast(106))
|
||||
assertEquals(squeezeCast(106), squeezeCast(106))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user