0.99.8: After Dark daytime Option B (19 lighter late-night cult films also by day)
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 1m58s
pauljd/davidson-ci: Davidson CI / ai-review (push) Failing after 1m31s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-11-04 10:10:54 +00:00
co-authored by Claude Opus 5.5
parent f42e30be31
commit 5f7018354c
9 changed files with 175 additions and 9 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ android {
applicationId = "tv.orbit.classic"
minSdk = 26
targetSdk = 36
versionCode = 137
versionName = "0.99.7-planning-speed"
versionCode = 138
versionName = "0.99.8-after-dark-daytime"
}
buildFeatures { compose = true }
compileOptions { sourceCompatibility = JavaVersion.VERSION_17; targetCompatibility = JavaVersion.VERSION_17 }
@@ -125,6 +125,16 @@ private val AfterDarkWithdrawn get() = setOf(
"5718634", // The Devil's Advocate (1997)
)
/**
* Lighter late-night cult films that may also play by day (Option B, approved by Paul 4 November 2026): PG and PG-13
* titles, the 1950s and 1960s monster films and the 1970s television films. They stay in the late-night rotation too.
* Ratings were checked against the catalogue; a PG or PG-13 rating isn't taken to mean suitable for children.
*/
internal val AfterDarkDaytimeCrossover get() = listOf("Attack of the Killer Tomatoes! (1978)", "Big Trouble in Little China", "Critters", "Harold and Maude",
"It Came from Outer Space", "Killer Klowns from Outer Space", "Mars Attacks!", "Night of the Comet", "Phantom of the Paradise", "Plan 9 from Outer Space",
"The Adventures of Buckaroo Banzai Across the 8th Dimension", "The Blob (1958)", "The Day of the Triffids", "Them! (1954)", "Count Dracula",
"The Night Stalker", "The Night Strangler", "Nosferatu the Vampyre", "Invasion of the Body Snatchers")
/** After Dark reads every film on its list, as the other film channels do. Reviewed suggestions join on top. */
private val AfterDarkFilms = listOf("The Thing (1982)", "The Evil Dead (1983)", "Re-Animator", "Hellraiser (1987)", "Videodrome", "An American Werewolf in London",
"Halloween (1978)", "Day of the Dead (1985)", "They Live", "Escape from New York", "The Fog (1980)", "Near Dark", "The Lost Boys (1987)", "Fright Night (1985)", "Society", "Tremors (1990)",
@@ -143,7 +153,7 @@ internal val SmartChannels = listOf(
withdrawn = AfterDarkWithdrawn,
dayParts = AfterDarkEvents + listOf(DayPart(21, 5), DayPart(5, 21, listOf("The 'Burbs", "'Til Death Do Us Part (2017)", "Tremors (1990)", "The Lost Boys (1987)", "Fright Night (1985)", "Poltergeist (1982)", "Scream (1996)",
"Escape from New York", "They Live", "Repo Man", "Donnie Darko", "From Dusk Till Dawn", "Creepshow", "Near Dark", "Halloween (1978)", "The Fog (1980)", "Blue Velvet",
"The Wicker Man (1973)", "An American Werewolf in London", "Prince of Darkness"), group = "day")),
"The Wicker Man (1973)", "An American Werewolf in London", "Prince of Darkness") + AfterDarkDaytimeCrossover, group = "day")),
suggestionRules = listOf(
SuggestionRule("day", "Daytime", "Movie", listOf("Horror", "Comedy"), 1975..2010, 6f, setOf("NC-17", "X"), 40, NotCultCinema, 70),
// Capped so the biggest blockbusters stay out: this channel is cult cinema.
@@ -66,7 +66,7 @@ internal class HttpsEmbyTransport(internal val deviceId: String = UUID.randomUUI
connection.connectTimeout = 10_000
connection.readTimeout = request.readTimeoutMs ?: if (request.path == "/Sessions/Logout") 5_000 else 15_000
connection.setRequestProperty("Accept", "application/json")
connection.setRequestProperty("X-Emby-Authorization", "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.99.7\"")
connection.setRequestProperty("X-Emby-Authorization", "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.99.8\"")
request.token?.let { connection.setRequestProperty("X-Emby-Token", it) }
if (request.method == "POST") {
val bytes = request.body.orEmpty().toByteArray(Charsets.UTF_8)
@@ -33,7 +33,7 @@ internal class SecureMediaDataSource(private val session: EmbySampleSession) : B
next.instanceFollowRedirects = false
next.connectTimeout = 10_000
next.readTimeout = 20_000
next.setRequestProperty("User-Agent", "OrbitTV/0.99.7")
next.setRequestProperty("User-Agent", "OrbitTV/0.99.8")
next.setRequestProperty("Accept-Encoding", "identity")
session.mediaHeaders(address).forEach { (key, value) -> next.setRequestProperty(key, value) }
if (dataSpec.position != 0L || dataSpec.length != C.LENGTH_UNSET.toLong()) {
@@ -53,14 +53,16 @@ class AfterDarkDaytimeReplayTest {
val base = SmartChannels.first { it.number == AFTER_DARK_NUMBER }
val committed = plan(File(dir, "schedule-305.json")); val series = pool(File(dir, "episodes-305.json"))
val others = clashesWith(SmartChannels.filter { it.number != AFTER_DARK_NUMBER }.mapNotNull { p -> File(dir, "schedule-${p.number}.json").takeIf { it.exists() }?.let(::plan) })
val dayPart = base.dayParts.single { it.group == "day" }
// As built, the day block carries Option B's crossover; today's version is the same block without it.
val dayPart = base.dayParts.single { it.group == "day" }.let { it.copy(titles = it.titles - AfterDarkDaytimeCrossover.toSet()) }
val withoutB = base.dayParts.map { if (it.group == "day") dayPart else it }
val missing = (daytime + earlyEvening).filter { t -> series.none { seriesKey(it.title) == seriesKey(t) } }
val out = StringBuilder("After Dark daytime options: four weeks of new bookings after the committed plan, from box copies. Read-only.\n" +
"Films named but not in the pool: ${missing.ifEmpty { listOf("none") }.joinToString()}\n\n")
val variants = listOf(
"A. Today: 05:00 to 21:00 from the day list and day suggestions" to base.dayParts,
"B. Selective crossover: ${daytime.size} lighter cult films also allowed 05:00 to 21:00" to base.dayParts.map { if (it == dayPart) it.copy(titles = it.titles + daytime) else it },
"C. Graded: B by day, then 18:00 to 21:00 also ${earlyEvening.size} cult comedies and British folk-horror television" to base.dayParts.flatMap {
"A. Before Option B: 05:00 to 21:00 from the day list and day suggestions" to withoutB,
"B. As built (Option B): ${AfterDarkDaytimeCrossover.size} lighter cult films also allowed 05:00 to 21:00" to base.dayParts,
"C. Graded: B by day, then 18:00 to 21:00 also ${earlyEvening.size} cult comedies and British folk-horror television" to withoutB.flatMap {
if (it != dayPart) listOf(it) else listOf(it.copy(toHour = 18, titles = it.titles + daytime), it.copy(fromHour = 18, titles = it.titles + daytime + earlyEvening))
})
for ((label, parts) in variants) {
@@ -33,4 +33,16 @@ class AfterDarkReviewTest {
assertTrue("#withdrawn:" in afterDark.signature)
assertTrue(SmartChannels.filter { it.number != AFTER_DARK_NUMBER }.none { "#withdrawn:" in it.signature })
}
@Test fun optionBLetsNineteenLighterFilmsPlayByDayAndKeepsTheIntenseOnesLate() {
val day = afterDark.dayParts.single { it.group == "day" }
assertEquals(19, AfterDarkDaytimeCrossover.size)
assertTrue(AfterDarkDaytimeCrossover.all { it in day.titles })
val lateOnly = listOf("The Evil Dead (1983)", "Hellraiser (1987)", "Re-Animator", "Society", "Videodrome", "Pink Flamingos", "Santa Sangre", "Possession",
"Angst", "Funny Games", "I Saw the Devil", "Ghostwatch", "The Texas Chain Saw Massacre", "Street Trash (1987)")
assertTrue(day.titles.map { seriesKey(FilmIdentity.of(it).title) }.none { t -> lateOnly.any { seriesKey(FilmIdentity.of(it).title) == t } })
// No withdrawn mainstream film comes back through the day list.
assertTrue(listOf("Jaws", "The Shining", "The Exorcist", "Alien (1979)").none { t -> day.titles.any { seriesKey(FilmIdentity.of(it).title) == seriesKey(FilmIdentity.of(t).title) } })
}
}
+44
View File
@@ -0,0 +1,44 @@
# Orbit TV 0.99.8: After Dark daytime, Option B
Paul approved this release on 4 November 2026 at 09:50 and 09:59. The change is to After Dark's daytime eligibility only. This release includes 0.99.7.
## What's in it
**`AfterDarkDaytimeCrossover`** (ChannelSchedule.kt) adds 19 of After Dark's own late-night cult films to its day block, 05:00 to 21:00. They stay in the late rotation as well.
**The 19 films:**
- **PG or PG-13:** Attack of the Killer Tomatoes!, Big Trouble in Little China, Critters, Harold and Maude, Killer Klowns from Outer Space, Mars Attacks!, Night of the Comet, Phantom of the Paradise, The Adventures of Buckaroo Banzai, Nosferatu the Vampyre (1979), Invasion of the Body Snatchers (1978).
- **1950s and 1960s monster films:** It Came from Outer Space, The Blob (1958), Them! (1954), The Day of the Triffids, Plan 9 from Outer Space.
- **1970s television films:** Count Dracula (BBC, TV-PG), The Night Stalker, The Night Strangler.
Ratings were checked against the catalogue. A PG or PG-13 rating isn't taken to mean suitable for children.
**Unchanged:**
- **Safeguards:** every eligibility and rating safeguard stays as it was. The day suggestion rules still exclude NC-17 and X, no film from outside After Dark's pool is added, and no withdrawn mainstream film returns.
- **Late night:** the 14-day night rest, the events and committed bookings.
## Checks before install
- **416 unit tests pass**, including the hand-run replays. Lint has no errors.
- **AfterDarkReviewTest** checks:
- all 19 are in the day block
- the intense and NC-17 titles aren't, among them The Evil Dead, Hellraiser, Re-Animator, Society, Videodrome, Pink Flamingos, Santa Sangre, Possession, Angst, Funny Games, I Saw the Devil, Ghostwatch, The Texas Chain Saw Massacre and Street Trash
- no withdrawn mainstream film is on the day list
- **Four-week real-pool replay** on box copies taken at 10:05, avoiding every other channel's plan (docs/replays/after-dark-daytime-0.99.8.txt):
| | Before Option B | 0.99.8 | Paul's target |
|---|---|---|---|
| Films by day | 34 | **53** | about 53 |
| Daytime repeat gap, median / shortest | 3.7 / 3.3 d | **5.5 / 5.0 d** | about 5.5 |
| Different films, whole channel | 127 | **135** | more |
| Any film again within 7 days | 223 | 202 | |
| Clashes with other channels | 0 | **0** | none new |
| Fixed-order fallbacks | 0 | **0** | no regression |
| Late-night rest | 14 d | **14 d** (shortest late gap 14.0 d) | preserved |
- **Late-night variety:** different late-night films fall from 84 to 73, because a film shown by day also rests before it can play late.
- **Fingerprints:** every committed fingerprint is identical to 0.99.7's. Only 305 differs (docs/replays/replay-fingerprints-0.99.8.txt).
## Rollback
Install 0.99.7. No saved data changes.
@@ -0,0 +1,27 @@
After Dark daytime options: four weeks of new bookings after the committed plan, from box copies. Read-only.
Films named but not in the pool: none
== A. Before Option B: 05:00 to 21:00 from the day list and day suggestions
blocks: 21-5 131 films, rest 14.0 d; 5-21 34 films, rest 3.3 d
Daytime 05:00 to 21:00: 257 screenings, 34 different films; repeat gap median 3.7 d, shortest 3.3 d; fixed-order fallbacks 0
Late 21:00 to 05:00: 107 screenings, 84 different films; repeat gap median 17.1 d, shortest 14.1 d; fixed-order fallbacks 0
Whole channel: 127 different films; any film again within 3 days 0, within 7 days 223
On another channel at the same time: 0; gaps 0
Most-screened by day: The League of Gentlemen Are Behind You 8, Mulholland Drive 8, They Live 8, The Frighteners 8, Halloween 8
== B. As built (Option B): 19 lighter cult films also allowed 05:00 to 21:00
blocks: 21-5 131 films, rest 14.0 d; 5-21 53 films, rest 5.0 d
Daytime 05:00 to 21:00: 262 screenings, 53 different films; repeat gap median 5.5 d, shortest 5.0 d; fixed-order fallbacks 0
Late 21:00 to 05:00: 107 screenings, 73 different films; repeat gap median 15.8 d, shortest 14.0 d; fixed-order fallbacks 0
Whole channel: 135 different films; any film again within 3 days 0, within 7 days 202
On another channel at the same time: 0; gaps 0
Most-screened by day: It Came from Outer Space 6, Night of the Comet 6, Phantom of the Paradise 6, Count Dracula 6, The Day of the Triffids 6
== C. Graded: B by day, then 18:00 to 21:00 also 12 cult comedies and British folk-horror television
blocks: 21-5 131 films, rest 14.0 d; 5-18 53 films, rest 6.2 d; 18-21 65 films, rest 14.0 d
Daytime 05:00 to 21:00: 266 screenings, 65 different films; repeat gap median 6.7 d, shortest 6.1 d; fixed-order fallbacks 67
Late 21:00 to 05:00: 101 screenings, 67 different films; repeat gap median 15.0 d, shortest 14.0 d; fixed-order fallbacks 0
Whole channel: 135 different films; any film again within 3 days 0, within 7 days 154
On another channel at the same time: 0; gaps 0
Most-screened by day: Mars Attacks! 5, The Blob 5, Them! 5, The Day of the Triffids 5, The Adventures of Buckaroo Banzai Across the 8th Dimension 5
@@ -0,0 +1,71 @@
# Four-week replay fingerprints, 0.99.7 against 0.99.8, from box copies taken 4 November 10:05
## 0.99.7
101 committed=df1f6a4f2607a40f kept=true fourWeeks=42b6c2589685c24e programmes=2187
102 committed=1a38690aea2ec737 kept=true fourWeeks=7e000c17156eafb1 programmes=1331
103 committed=9789806b5970a126 kept=true fourWeeks=42583c9058b1bec8 programmes=1849
104 committed=aefdd56242124676 kept=true fourWeeks=77f6a7e3bc0ba69c programmes=1752
105 committed=0d0d6b1b0dfbc1a1 kept=true fourWeeks=1eeab6e77b102163 programmes=2509
106 committed=c6e05fe7b6b8119e kept=true fourWeeks=a4207fcc179d9c1a programmes=1159
107 committed=306a5462432f7786 kept=true fourWeeks=b0ea94a03811edc1 programmes=988
201 committed=3b19e3bc730bf848 kept=true fourWeeks=7e1cdb97b7a40718 programmes=959
202 committed=9ee874c1bb9b0886 kept=true fourWeeks=59d42ffbd900d9f7 programmes=1106
203 committed=99f6b4220cff3cbc kept=true fourWeeks=7c9092d57552f039 programmes=1147
204 committed=635537fa63101747 kept=true fourWeeks=ea829e3413e800d0 programmes=1261
301 committed=cb9c3dfeebdfd3ce kept=true fourWeeks=1138042adf912319 programmes=355
302 committed=042b4ed169971dda kept=true fourWeeks=4747ecb7df967f51 programmes=446
303 committed=e0583a7eb1a82100 kept=true fourWeeks=2e109220600f6caa programmes=422
304 committed=3d62105f6fce7296 kept=true fourWeeks=03e7a36d851730ba programmes=498
305 committed=fc22f2854413a97d kept=true fourWeeks=d191b7051ee90dda programmes=492
306 committed=ddb284481edcdf5f kept=true fourWeeks=390e53c5f2aa3e0d programmes=494
307 committed=95087afee891c9ff kept=true fourWeeks=7c267a8cdbf693fa programmes=443
308 committed=caa2613998d76d0d kept=true fourWeeks=5a68309f856b533d programmes=503
309 committed=c9d3865ba25f4ebc kept=true fourWeeks=c94e22dd641452b3 programmes=501
401 committed=cd83905cd77d923a kept=true fourWeeks=7319562cd9d0ac99 programmes=890
601 committed=6fb27e99db3e2025 kept=true fourWeeks=85656a6f32c7acef programmes=2173
602 committed=5aa7e3e96084161f kept=true fourWeeks=c7e361801f3c1d8f programmes=2352
603 committed=4a56aa7d474eb9f9 kept=true fourWeeks=811fb1d3a9738d0a programmes=2313
604 committed=01a3462efcca5880 kept=true fourWeeks=5645cd696a4c7ef2 programmes=3160
605 committed=b5a2a40669a04d93 kept=true fourWeeks=7c4588b99454b2eb programmes=4430
611 committed=b4cd5b2b164f81cf kept=true fourWeeks=a09f6ceb8d837f14 programmes=3031
612 committed=21dc64eb844a9767 kept=true fourWeeks=08b5cba3b889649e programmes=577
613 committed=bbcae35720001cff kept=true fourWeeks=1ac6222e88e010dc programmes=525
614 committed=024c93fb62c42b7f kept=true fourWeeks=c3f77d3748f3283d programmes=3788
## 0.99.8
101 committed=df1f6a4f2607a40f kept=true fourWeeks=42b6c2589685c24e programmes=2187
102 committed=1a38690aea2ec737 kept=true fourWeeks=7e000c17156eafb1 programmes=1331
103 committed=9789806b5970a126 kept=true fourWeeks=42583c9058b1bec8 programmes=1849
104 committed=aefdd56242124676 kept=true fourWeeks=77f6a7e3bc0ba69c programmes=1752
105 committed=0d0d6b1b0dfbc1a1 kept=true fourWeeks=1eeab6e77b102163 programmes=2509
106 committed=c6e05fe7b6b8119e kept=true fourWeeks=a4207fcc179d9c1a programmes=1159
107 committed=306a5462432f7786 kept=true fourWeeks=b0ea94a03811edc1 programmes=988
201 committed=3b19e3bc730bf848 kept=true fourWeeks=7e1cdb97b7a40718 programmes=959
202 committed=9ee874c1bb9b0886 kept=true fourWeeks=59d42ffbd900d9f7 programmes=1106
203 committed=99f6b4220cff3cbc kept=true fourWeeks=7c9092d57552f039 programmes=1147
204 committed=635537fa63101747 kept=true fourWeeks=ea829e3413e800d0 programmes=1261
301 committed=cb9c3dfeebdfd3ce kept=true fourWeeks=1138042adf912319 programmes=355
302 committed=042b4ed169971dda kept=true fourWeeks=4747ecb7df967f51 programmes=446
303 committed=e0583a7eb1a82100 kept=true fourWeeks=2e109220600f6caa programmes=422
304 committed=3d62105f6fce7296 kept=true fourWeeks=03e7a36d851730ba programmes=498
305 committed=fc22f2854413a97d kept=true fourWeeks=ce3a1f3581f8ce5f programmes=499
306 committed=ddb284481edcdf5f kept=true fourWeeks=390e53c5f2aa3e0d programmes=494
307 committed=95087afee891c9ff kept=true fourWeeks=7c267a8cdbf693fa programmes=443
308 committed=caa2613998d76d0d kept=true fourWeeks=5a68309f856b533d programmes=503
309 committed=c9d3865ba25f4ebc kept=true fourWeeks=c94e22dd641452b3 programmes=501
401 committed=cd83905cd77d923a kept=true fourWeeks=7319562cd9d0ac99 programmes=890
601 committed=6fb27e99db3e2025 kept=true fourWeeks=85656a6f32c7acef programmes=2173
602 committed=5aa7e3e96084161f kept=true fourWeeks=c7e361801f3c1d8f programmes=2352
603 committed=4a56aa7d474eb9f9 kept=true fourWeeks=811fb1d3a9738d0a programmes=2313
604 committed=01a3462efcca5880 kept=true fourWeeks=5645cd696a4c7ef2 programmes=3160
605 committed=b5a2a40669a04d93 kept=true fourWeeks=7c4588b99454b2eb programmes=4430
611 committed=b4cd5b2b164f81cf kept=true fourWeeks=a09f6ceb8d837f14 programmes=3031
612 committed=21dc64eb844a9767 kept=true fourWeeks=08b5cba3b889649e programmes=577
613 committed=bbcae35720001cff kept=true fourWeeks=1ac6222e88e010dc programmes=525
614 committed=024c93fb62c42b7f kept=true fourWeeks=c3f77d3748f3283d programmes=3788
## Differences
16c16
< 305 committed=fc22f2854413a97d kept=true fourWeeks=d191b7051ee90dda programmes=492
---
> 305 committed=fc22f2854413a97d kept=true fourWeeks=ce3a1f3581f8ce5f programmes=499