0.88.0: Vortex, Heroes, Orbit X, Rewind and ToonZ identities; Movie Nights roadmap principle
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -68,4 +68,40 @@ class ChannelIdentityTest {
|
||||
assertTrue("channel $number longest run $longest", longest <= 2)
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun vortexMovieNightComesBeforeToonamiAndAdultAnimeWaitsForLate() {
|
||||
val vortex = SmartChannels.first { it.number == VORTEX_NUMBER }
|
||||
val friday = ZonedDateTime.of(2026, 11, 13, 21, 0, 0, 0, zone).toInstant().toEpochMilli()
|
||||
val film = PoolSeries("f", "Dragon Ball Z: Broly", listOf(PoolEpisode("f", "src", EpisodeMark(1, 1), "Film", 90 * 60_000L)), "movie")
|
||||
val adult = PoolSeries("a", "Attack on Titan", (1..20).map { PoolEpisode("a$it", "src", EpisodeMark(1, it), "E$it", 24 * 60_000L) }, "day")
|
||||
val pool = library(vortex.searches, 23) + film + adult
|
||||
assertEquals("event movie", dayPartChoice(pool, vortex.dayParts, friday, zone).second)
|
||||
assertEquals("block toonami", dayPartChoice(pool, vortex.dayParts, friday + 7 * 24 * 60 * 60_000L - 24 * 60 * 60_000L, zone).second)
|
||||
val week = extendSchedule(pool, ScheduleCursor(), monday, monday + this.week, finishTogether = true, dayParts = vortex.dayParts, zone = zone)
|
||||
assertTrue(week.entries.filter { it.seriesId == "a" }.all { local(it.startMs).hour !in 6..22 })
|
||||
assertTrue(week.entries.any { it.seriesId == "a" })
|
||||
}
|
||||
|
||||
@Test fun kidsChannelsKeepTheirBlocks() {
|
||||
val heroes = plan(602, 22)
|
||||
val saturdayMorning = titlesWhere(heroes) { it.dayOfWeek == java.time.DayOfWeek.SATURDAY && it.hour in 8..10 }
|
||||
assertTrue(saturdayMorning.isNotEmpty() && saturdayMorning.none { it.startsWith("Batman") })
|
||||
val orbitX = plan(603, 22)
|
||||
assertTrue(titlesWhere(orbitX) { it.dayOfWeek.value <= 5 && it.hour in 16..17 }.all { it !in listOf("Exosquad", "Inspector Gadget", "Street Sharks") })
|
||||
assertTrue(titlesWhere(orbitX) { true }.contains("Biker Mice from Mars"))
|
||||
val toonz = plan(605, 7)
|
||||
assertTrue(titlesWhere(toonz) { it.hour in 16..17 }.contains("Danger Mouse"))
|
||||
assertFalse("teatime and overnight only", titlesWhere(toonz) { it.hour in 6..15 || it.hour >= 18 }.contains("Danger Mouse"))
|
||||
val rewind = plan(604, 11)
|
||||
assertEquals(keys("Dexter's Laboratory", "Johnny Bravo", "The Powerpuff Girls", "Cow and Chicken", "I Am Weasel", "Ed, Edd n Eddy", "Ed Edd n Eddy",
|
||||
"Courage the Cowardly Dog", "The Grim Adventures of Billy & Mandy", "Codename: Kids Next Door", "Foster's Home for Imaginary Friends"),
|
||||
titlesWhere(rewind) { it.hour >= 23 || it.hour < 6 }.map(::seriesKey).toSet())
|
||||
}
|
||||
|
||||
@Test fun coreShowsAirMoreThanSupportingOnes() {
|
||||
val heroes = plan(602, 22).entries.groupingBy { it.media.item.title.substringBefore(" / ") }.eachCount()
|
||||
assertTrue("$heroes", heroes.getValue("Batman: The Animated Series") > heroes.getValue("Silver Surfer"))
|
||||
val toonz = plan(605, 7).entries.groupingBy { it.media.item.title.substringBefore(" / ") }.eachCount()
|
||||
assertTrue("$toonz", toonz.getValue("Tom and Jerry") > toonz.getValue("Top Cat"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,14 +83,17 @@ class ChannelSuggestionsTest {
|
||||
|
||||
@Test fun afterDarkAndVortexBlocksAcceptTheirGroups() {
|
||||
assertEquals("day", SmartChannels.first { it.number == AFTER_DARK_NUMBER }.dayParts[1].group)
|
||||
assertEquals(listOf("movie", "day", "night"), SmartChannels.first { it.number == VORTEX_NUMBER }.dayParts.map { it.group })
|
||||
val groups = SmartChannels.first { it.number == VORTEX_NUMBER }.dayParts.map { it.group }
|
||||
// Movie Night takes reviewed films, evening suggestions stay in the evening, and daytime suggestions not yet placed by hand go late.
|
||||
assertEquals(listOf("movie", "", "", "toonami", "night", "toonami", "day"), groups)
|
||||
}
|
||||
|
||||
@Test fun vortexKeepsPaulsToonamiPicksInTheRightBlocks() {
|
||||
val vortex = SmartChannels.first { it.number == VORTEX_NUMBER }
|
||||
val day = vortex.dayParts.first { it.group == "day" }.titles.map(::seriesKey)
|
||||
val day = vortex.dayParts[1].titles.map(::seriesKey)
|
||||
assertTrue(listOf("Batman Beyond", "Batman: The Animated Series", "ThunderCats", "The Powerpuff Girls", "Jonny Quest").all { seriesKey(it) in day })
|
||||
assertTrue(seriesKey("Dragon Ball Z") in vortex.dayParts.first { it.group == "night" }.titles.map(::seriesKey))
|
||||
assertTrue(seriesKey("Dragon Ball Z") in vortex.dayParts.first { it.group == "toonami" }.titles.map(::seriesKey))
|
||||
assertTrue(seriesKey("Attack on Titan") !in day)
|
||||
assertEquals(vortex.searches.size, vortex.searches.distinct().size)
|
||||
assertTrue(vortex.seriesCount >= vortex.searches.size)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user