diff --git a/android/app/src/test/java/tv/orbit/classic/PremiereReplayTest.kt b/android/app/src/test/java/tv/orbit/classic/PremiereReplayTest.kt index 222c6e75..e8a4f498 100644 --- a/android/app/src/test/java/tv/orbit/classic/PremiereReplayTest.kt +++ b/android/app/src/test/java/tv/orbit/classic/PremiereReplayTest.kt @@ -92,6 +92,17 @@ class PremiereReplayTest { val booked = with[PREMIERE_NUMBER].orEmpty().firstOrNull { it.why.startsWith(PREMIERE_WHY) && it.seriesId == d.film.itemId } out.appendLine("${d.film.title}: approved ${at(debut)} on Orbit Premiere -> " + if (booked == null) "NOT BOOKED" else "booked ${at(booked.startMs)} to ${at(booked.endMs)} (${(booked.startMs - debut) / 60_000} min late)") + if (booked != null) { + val plan301 = with[PREMIERE_NUMBER].orEmpty().sortedBy { it.startMs } + val before = plan301.lastOrNull { it.startMs < booked.startMs } + out.appendLine(" before it on Premiere: ${before?.let { "${it.media.item.title} ${at(it.startMs)} to ${at(it.endMs)}, ${if (it.endMs == booked.startMs) "ends exactly as the debut starts" else if (it.endMs > booked.startMs) "OVERLAPS" else "ends ${(booked.startMs - it.endMs) / 60_000} min before"}" } ?: "nothing"}") + val page = whatsOnPage(mapOf(PREMIERE_NUMBER to ChannelPlan(plan301, ScheduleCursor())), null, booked.startMs - 3 * 3_600_000L, zone) + val item = (listOfNotNull(page.pick) + page.tonight + page.comingUp).firstOrNull { it.title.contains(d.film.title) } + out.appendLine(" What's On, three hours before: ${item?.let { "${it.tag} at ${at(it.startMs)}" } ?: "not listed"}") + val home = d.call.home + val windowEnd = d.windowEndMs(zone) + out.appendLine(" window ends ${at(windowEnd)}; channel $home first shows it ${with[home].orEmpty().filter { it.seriesId == d.film.itemId }.minOfOrNull { it.startMs }?.let(::at) ?: "after the replay ends"}") + } out.appendLine(" competing headline events that evening: ${competingEvent(debut, debut + (booked?.media?.durationMs ?: 3 * 3_600_000L), zone, except = d.film.itemId) ?: "none"}") val showings = with.flatMap { (n, es) -> es.filter { it.seriesId == d.film.itemId || seriesKey(it.media.item.title) == seriesKey(d.film.title) }.map { n to it } }.sortedBy { it.second.startMs } showings.forEach { (n, e) -> out.appendLine(" $n ${at(e.startMs)} ${e.why.take(60)}") } diff --git a/docs/replays/premiere-checks-0.111.0.txt b/docs/replays/premiere-checks-0.111.0.txt index 5f16cb8d..05967c5b 100644 --- a/docs/replays/premiere-checks-0.111.0.txt +++ b/docs/replays/premiere-checks-0.111.0.txt @@ -1,4 +1,7 @@ Avatar: Fire and Ash: approved 2026-11-27 20:00 on Orbit Premiere -> booked 2026-11-27 20:00 to 2026-11-27 23:18 (0 min late) + before it on Premiere: Top Gun 2026-11-27 18:11 to 2026-11-27 20:00, ends exactly as the debut starts + What's On, three hours before: ORBIT PREMIERE at 2026-11-27 20:00 + window ends 2026-12-25 20:00; channel 303 first shows it 2027-01-01 11:35 competing headline events that evening: none 301 2026-11-27 20:00 orbit premiere: debut; approved by Paul on 5 November 2026; 301 2026-12-05 21:47 whole pool; picked from 20 rested films, last shown 193h ago @@ -13,6 +16,9 @@ Avatar: Fire and Ash: approved 2026-11-27 20:00 on Orbit Premiere -> booked 2026 shortest gap between Premiere showings: 193 h advent hold applies: false Spider-Man: Brand New Day: approved 2026-12-11 20:00 on Orbit Premiere -> booked 2026-12-11 20:03 to 2026-12-11 22:28 (3 min late) + before it on Premiere: Spider-Man: No Way Home 2026-12-11 17:26 to 2026-12-11 20:03, ends exactly as the debut starts + What's On, three hours before: ORBIT PREMIERE at 2026-12-11 20:03 + window ends 2027-01-08 20:00; channel 302 first shows it 2027-01-16 17:36 competing headline events that evening: none 301 2026-12-11 20:03 orbit premiere: debut; approved by Paul on 5 November 2026; 301 2026-12-21 12:18 whole pool; picked from 20 rested films, last shown 232h ago