Build 78: ATLAS (113), international television and world cinema, in the original language with English subtitles

- 71 series and 116 films (years and IMDb IDs), five dayparts and four film events: World Cinema Premiere (Saturday
  21:00), The Masters (Sunday 14:00), and the monthly Asia Extreme (first Friday, 23:00) and Passport (first Sunday,
  21:00); DayPart.monthWeek for monthly events
- AtlasPlayback: every title's original language, checked against its file tracks; ATLAS's pools are read under the rule
  (original sound tagged, full English subtitles), and a serial keeps only its unbroken clear run (clearRun)
- No English-sound filter on ATLAS; its film events use the film channels' exact identity lookup
- Shōgun and Dark as guests; Who Killed Sara? moves from Dark Files' list to ATLAS
- Paul's ATLAS design kit: guide logo, corner logo, a Blender guide background, 7 s ident, nine block idents with stings
  (the kit's clips are silent; the ATLAS sound family is new)
- 21:00 watershed for anything above TV-14; tests for the rule, monthly events and clear runs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 12:18:59 +00:00
co-authored by Claude Opus 5.5
parent fd4245b6b3
commit 907b9b35d3
41 changed files with 530 additions and 50 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ plugins {
id("org.jetbrains.kotlin.plugin.compose")
}
/** The release's build number: versionCode is this x 10 plus the edition's channel. */
val ORBIT_BUILD = 77
val ORBIT_BUILD = 78
android {
namespace = "tv.orbit.classic"
compileSdk = 36
@@ -0,0 +1,217 @@
package tv.orbit.classic
import java.time.DayOfWeek
/**
* ATLAS (Paul, 24 November 2026): the world's stories on one channel, international television and cinema from every
* country, decade, budget and genre, in the original language with English subtitles. Classics and prize-winners sit beside
* action, horror, science fiction, epics, comedy and cult films. Anime stays on Sakura; Silver Screen keeps the golden age.
*
* Every title was checked episode by episode (docs/channels/atlas.md): a series plays only up to its first episode without
* its original sound and full English subtitles ([AtlasPlayback], applied again as each pool is read), so a serial never
* skips. Sound and subtitles on screen follow [AtlasPlayback] on this channel only. Shōgun and Dark are guests here, at the
* lowest weight; Signature stays their home. Who Killed Sara? has its home here rather than on Dark Files.
*
* The day travels: warm drama in the morning, history in the afternoon, crime at teatime, the international hits from the
* 21:00 watershed, and the dark and adult after midnight. Nothing rated above TV-14 is placed before 21:00.
*/
private val AtlasMornings = listOf(
"My Mister", "Crash Landing on You", "Extraordinary Attorney Woo", "Mr. Queen", "Under the Queen's Umbrella",
"The Makanai: Cooking for the Maiko House", "Shtisel", "Kota Factory", "Better Than Us", "Velvet", "Cable Girls",
"Heeramandi: The Diamond Bazaar")
private val AtlasGrandTour = listOf(
"Story of Yanxi Palace", "Cable Girls", "Velvet", "Heeramandi: The Diamond Bazaar", "Midnight at the Pera Palace",
"Under the Queen's Umbrella", "Mr. Queen")
private val AtlasCaseFiles = listOf(
"Vincenzo", "The Killing", "Black Spot", "The Family Man", "Unnatural", "Galileo", "The Days (2023)", "Fauda",
"Prisoners of War", "Dark")
private val AtlasPrime = listOf(
"Squid Game", "Alice in Borderland (2020)", "Money Heist", "The Glory", "SKY Castle", "Sacred Games", "Tehran", "Borgen",
"The Law According to Lidia Poët", "Gyeongseong Creature", "Shōgun", "Cien Años De Soledad",
"Scam 1992 - The Harshad Mehta Story", "Delhi Crime", "Lupin", "My Brilliant Friend", "1899", "Tokyo Swindlers", "Giri/Haji",
"Ethos")
/** Dark, violent and adult: after midnight only. */
private val AtlasNight = listOf(
"The 8 Show", "Hellbound", "All of Us Are Dead", "Juvenile Justice", "D.P.", "Gannibal", "The Naked Director", "Elite",
"Who Killed Sara?", "Girl From Nowhere", "Pablo Escobar, The Drug Lord", "La Reina del Sur", "Dark Desire", "Paatal Lok",
"Gomorrah", "Ragnarok", "The Rain", "To the Lake", "Into the Night", "Bloodhounds (2023)", "My Name", "Prison Playbook",
"First Love (2022)", "House of Ninjas", "Midnight Diner", "Panchayat", "Quicksand")
/** Saturday's World Cinema Premiere: modern hits, prize-winners and genre cinema from around the world. */
private val AtlasPremiere = listOf(
"Parasite (2019)", "Anatomy of a Fall (2023)", "Drive My Car (2021)", "Portrait of a Lady on Fire (2019)",
"A Separation (2011)", "Capernaum (2018)", "Another Round (2020)", "Decision to Leave (2022)", "Perfect Days (2023)",
"The Worst Person in the World (2021)", "City of God (2002)", "Godzilla Minus One (2023)", "The Raid (2011)", "Kill (2024)",
"Andhadhun (2018)", "Riders of Justice (2020)", "Argentina, 1985 (2022)", "Wolf Warrior 2 (2017)",
"The Wandering Earth II (2023)", "Red Cliff (2008)", "Baahubali: The Beginning (2015)", "Infernal Affairs (2002)",
"Kung Fu Hustle (2004)", "The Intouchables (2011)", "Amélie (2001)", "Volver (2006)", "Shin Godzilla (2016)",
"The Host (2006)", "Train to Busan (2016)", "Elite Squad (2007)", "Y Tu Mamá También (2001)", "Past Lives (2023)",
"Cold War (2018)", "Burning (2018)", "Veteran (2015)", "The Conformist (1970)", "Paris, Texas (1984)", "Mediterraneo (1991)",
"Snowpiercer (2013)", "Okja (2017)", "The Night Comes for Us (2018)", "Ong-Bak (2003)", "Hard Boiled (1992)",
"The Killer (1989)", "Timecrimes (2007)", "Attraction (2017)", "The Wandering Earth (2019)",
"OSS 117: Cairo, Nest of Spies (2006)", "Hera Pheri (2000)", "Queen (2014)", "Dangal (2016)", "Force Majeure (2014)",
"The Wave (2015)", "Kon-Tiki (2012)", "Triangle of Sadness (2022)", "Downfall (2004)",
"All Quiet on the Western Front (2022)", "A Prophet (2009)", "Blue Is the Warmest Color (2013)", "Caché (2005)",
"Titane (2021)", "Monsoon Wedding (2001)", "Evil Does Not Exist (2023)", "Joint Security Area (2000)",
"A Taxi Driver (2017)", "Léon: The Professional (1994)", "The City of Lost Children (1995)", "Hardcore Henry (2015)",
"Cronos (1993)", "Breaking the Waves (1996)", "Dancer in the Dark (2000)", "Ma mère (2004)")
/** Sunday's The Masters, at 14:00: classics suitable for the afternoon (nothing rated R). */
private val AtlasMasters = listOf(
"Seven Samurai (1954)", "Ikiru (1952)", "Kwaidan (1964)", "La Dolce Vita (1960)", "Persona (1966)",
"Aguirre, the Wrath of God (1972)", "Fitzcarraldo (1982)", "Solaris (1972)", "Andrei Rublev (1966)", "Rififi (1955)",
"Nosferatu (1922)", "The Cabinet of Dr. Caligari (1920)", "Battleship Potemkin (1925)", "Pyaasa (1957)",
"Black Orpheus (1959)", "Jean de Florette (1986)", "The Last Emperor (1987)", "Lagaan (2001)", "Yi Yi (2000)",
"In the Mood for Love (2000)", "Chungking Express (1994)", "Jodhaa Akbar (2008)")
/** Asia Extreme, the first Friday night of the month: thrillers and horror, sharing films with Horror and After Dark under the film rest. */
private val AtlasExtreme = listOf(
"Oldboy (2003)", "The Chaser (2008)", "The Wailing (2016)", "Memories of Murder (2003)", "Mother (2009)", "Audition (1999)",
"A Tale of Two Sisters (2003)", "Sympathy for Mr. Vengeance (2002)", "The Yellow Sea (2010)", "The Man from Nowhere (2010)",
"Cure (1997)", "Dark Water (2002)", "Sleep (2023)", "Exhuma (2024)", "Tetsuo: The Iron Man (1989)", "Tumbbad (2018)",
"Inside (2007)", "Raw (2016)", "[REC] (2008)", "The Orphanage (2007)", "Let the Right One In (2008)", "Suspiria (1977)")
/** Passport, the first Sunday evening of the month: two films from one corner of the world. */
private val AtlasPassport = listOf(
"A Prophet (2009)", "Caché (2005)", "The Intouchables (2011)", "Amélie (2001)", "Lagaan (2001)", "Dangal (2016)",
"Andhadhun (2018)", "Let the Right One In (2008)", "Riders of Justice (2020)", "Another Round (2020)", "City of God (2002)",
"Elite Squad (2007)", "Volver (2006)", "Y Tu Mamá También (2001)")
internal val AtlasShows get() = (AtlasMornings + AtlasGrandTour + AtlasCaseFiles + AtlasPrime + AtlasNight).distinct()
internal val AtlasFilms get() = (AtlasPremiere + AtlasMasters + AtlasExtreme + AtlasPassport).distinct()
internal val AtlasDayParts get() = listOf(
DayPart(23, 2, AtlasExtreme, group = "Asia Extreme", days = setOf(DayOfWeek.FRIDAY), onTime = true, key = "atlas.asiaextreme", monthWeek = 1),
DayPart(21, 0, AtlasPassport, group = "Passport", days = setOf(DayOfWeek.SUNDAY), onTime = true, key = "atlas.passport", monthWeek = 1),
DayPart(21, 0, AtlasPremiere, group = "World Cinema Premiere", days = setOf(DayOfWeek.SATURDAY), onTime = true, once = true, key = "atlas.premiere"),
DayPart(14, 18, AtlasMasters, group = "The Masters", days = setOf(DayOfWeek.SUNDAY), onTime = true, once = true, key = "atlas.masters"),
DayPart(6, 12, AtlasMornings, group = "World Mornings", key = "atlas.mornings"),
DayPart(12, 17, AtlasGrandTour, group = "Grand Tour", key = "atlas.grandtour"),
DayPart(17, 21, AtlasCaseFiles, group = "Case Files", key = "atlas.casefiles"),
DayPart(21, 0, AtlasPrime, group = "Prime Atlas", key = "atlas.prime"),
DayPart(0, 6, AtlasNight, group = "Night Passage", key = "atlas.nightpassage"))
/** Standalone episodes mix; every other series plays in season and episode order. */
internal val AtlasMixed get() = setOf("Galileo", "Unnatural", "Girl From Nowhere", "Midnight Diner")
/** Long serials are supporting, so they don't take over a block; the Signature guests come round least. */
internal val AtlasTiers: Map<String, Double> get() =
AtlasShows.associate { seriesKey(it) to TIER_CORE } +
listOf("Story of Yanxi Palace", "La Reina del Sur", "Pablo Escobar, The Drug Lord", "Elite").associate { seriesKey(it) to TIER_SUPPORTING } +
listOf("Shōgun", "Dark").associate { seriesKey(it) to TIER_SURPRISE }
/** Each film by its year and IMDb ID, so a remake or another film of the same name is never taken for it. */
internal val AtlasImdb: Map<String, String> by lazy { mapOf(
"A Prophet (2009)" to "tt1235166",
"A Separation (2011)" to "tt1832382",
"A Tale of Two Sisters (2003)" to "tt0365376",
"A Taxi Driver (2017)" to "tt6878038",
"Aguirre, the Wrath of God (1972)" to "tt0068182",
"All Quiet on the Western Front (2022)" to "tt1016150",
"Amélie (2001)" to "tt0211915",
"Anatomy of a Fall (2023)" to "tt17009710",
"Andhadhun (2018)" to "tt8108198",
"Andrei Rublev (1966)" to "tt0060107",
"Another Round (2020)" to "tt10288566",
"Argentina, 1985 (2022)" to "tt15301048",
"Attraction (2017)" to "tt4731148",
"Audition (1999)" to "tt0235198",
"Baahubali: The Beginning (2015)" to "tt2631186",
"Battleship Potemkin (1925)" to "tt0015648",
"Black Orpheus (1959)" to "tt0053146",
"Blue Is the Warmest Color (2013)" to "tt2278871",
"Breaking the Waves (1996)" to "tt0115751",
"Burning (2018)" to "tt7282468",
"Caché (2005)" to "tt0387898",
"Capernaum (2018)" to "tt8267604",
"Chungking Express (1994)" to "tt0109424",
"City of God (2002)" to "tt0317248",
"Cold War (2018)" to "tt6543652",
"Cronos (1993)" to "tt0104029",
"Cure (1997)" to "tt0123948",
"Dancer in the Dark (2000)" to "tt0168629",
"Dangal (2016)" to "tt5074352",
"Dark Water (2002)" to "tt0308379",
"Decision to Leave (2022)" to "tt12477480",
"Downfall (2004)" to "tt0363163",
"Drive My Car (2021)" to "tt14039582",
"Elite Squad (2007)" to "tt0861739",
"Evil Does Not Exist (2023)" to "tt28490044",
"Exhuma (2024)" to "tt27802490",
"Fitzcarraldo (1982)" to "tt0083946",
"Force Majeure (2014)" to "tt2121382",
"Godzilla Minus One (2023)" to "tt23289160",
"Hard Boiled (1992)" to "tt0104684",
"Hardcore Henry (2015)" to "tt3072482",
"Hera Pheri (2000)" to "tt0242519",
"Ikiru (1952)" to "tt0044741",
"In the Mood for Love (2000)" to "tt0118694",
"Infernal Affairs (2002)" to "tt0338564",
"Inside (2007)" to "tt0856288",
"Jean de Florette (1986)" to "tt0091288",
"Jodhaa Akbar (2008)" to "tt0449994",
"Joint Security Area (2000)" to "tt0260991",
"Kill (2024)" to "tt28259207",
"Kon-Tiki (2012)" to "tt1613750",
"Kung Fu Hustle (2004)" to "tt0373074",
"Kwaidan (1964)" to "tt0058279",
"La Dolce Vita (1960)" to "tt0053779",
"Lagaan (2001)" to "tt0169102",
"Let the Right One In (2008)" to "tt1139797",
"Léon: The Professional (1994)" to "tt0110413",
"Ma mère (2004)" to "tt0381392",
"Mediterraneo (1991)" to "tt0102426",
"Memories of Murder (2003)" to "tt0353969",
"Monsoon Wedding (2001)" to "tt0265343",
"Mother (2009)" to "tt1216496",
"Nosferatu (1922)" to "tt0013442",
"OSS 117: Cairo, Nest of Spies (2006)" to "tt0464913",
"Okja (2017)" to "tt3967856",
"Oldboy (2003)" to "tt0364569",
"Ong-Bak (2003)" to "tt0368909",
"Parasite (2019)" to "tt6751668",
"Paris, Texas (1984)" to "tt0087884",
"Past Lives (2023)" to "tt13238346",
"Perfect Days (2023)" to "tt27503384",
"Persona (1966)" to "tt0060827",
"Portrait of a Lady on Fire (2019)" to "tt8613070",
"Pyaasa (1957)" to "tt0050870",
"Queen (2014)" to "tt3322420",
"Raw (2016)" to "tt4954522",
"Red Cliff (2008)" to "tt0425637",
"Riders of Justice (2020)" to "tt11655202",
"Rififi (1955)" to "tt0048021",
"Seven Samurai (1954)" to "tt0047478",
"Shin Godzilla (2016)" to "tt4262980",
"Sleep (2023)" to "tt8209702",
"Snowpiercer (2013)" to "tt1706620",
"Solaris (1972)" to "tt0069293",
"Suspiria (1977)" to "tt0076786",
"Sympathy for Mr. Vengeance (2002)" to "tt0310775",
"Tetsuo: The Iron Man (1989)" to "tt0096251",
"The Cabinet of Dr. Caligari (1920)" to "tt0010323",
"The Chaser (2008)" to "tt1190539",
"The City of Lost Children (1995)" to "tt0112682",
"The Conformist (1970)" to "tt0065571",
"The Host (2006)" to "tt0468492",
"The Intouchables (2011)" to "tt1675434",
"The Killer (1989)" to "tt0097202",
"The Last Emperor (1987)" to "tt0093389",
"The Man from Nowhere (2010)" to "tt1527788",
"The Night Comes for Us (2018)" to "tt6116856",
"The Orphanage (2007)" to "tt0464141",
"The Raid (2011)" to "tt1899353",
"The Wailing (2016)" to "tt5215952",
"The Wandering Earth (2019)" to "tt7605074",
"The Wandering Earth II (2023)" to "tt13539646",
"The Wave (2015)" to "tt3616916",
"The Worst Person in the World (2021)" to "tt10370710",
"The Yellow Sea (2010)" to "tt1230385",
"Timecrimes (2007)" to "tt0480669",
"Titane (2021)" to "tt10944760",
"Train to Busan (2016)" to "tt5700672",
"Triangle of Sadness (2022)" to "tt7322224",
"Tumbbad (2018)" to "tt8239946",
"Veteran (2015)" to "tt4768764",
"Volver (2006)" to "tt0441909",
"Wolf Warrior 2 (2017)" to "tt7131870",
"Y Tu Mamá También (2001)" to "tt0245574",
"Yi Yi (2000)" to "tt0244316",
"[REC] (2008)" to "tt1038988") }
@@ -26,30 +26,75 @@ internal data class AtlasTracks(val original: String, val subtitles: Boolean)
internal object AtlasPlayback {
/**
* Original languages, by series or film title as Orbit names it. The controlled TV test set first (24 November 2026):
* Korean, Japanese, Spanish and Hindi, image-based subtitles, and multilingual productions.
* Original languages of ATLAS's 75 series and 116 films (24 November 2026), by title as the library names them, from each
* production itself and checked against the sound tracks actually in the files. "en+" marks a multilingual production
* whose own mix is the English-labelled track (Shōgun, 1899, Giri/Haji, Okja, Past Lives, Monsoon Wedding, Cronos).
* Signal stays as the playback test's control: its later episodes have no English subtitles and must be refused.
*/
val originals: Map<String, String> = mapOf(
"Squid Game" to "ko", "The 8 Show" to "ko", "Crash Landing on You" to "ko", "Extraordinary Attorney Woo" to "ko",
"Alice in Borderland" to "ja", "Gannibal" to "ja", "Midnight Diner" to "ja",
"Cable Girls" to "es", "Money Heist" to "es", "Who Killed Sara?" to "es", "Elite" to "es",
"Sacred Games" to "hi", "Delhi Crime" to "hi", "Panchayat" to "hi",
"Story of Yanxi Palace" to "zh", "The Killing" to "da",
// In the test as a control: its later episodes have no English subtitles, so they must be refused.
"Signal" to "ko",
// Multilingual productions: their own mix is the English-labelled track; English subtitles cover the rest.
"Shōgun" to "en+", "1899" to "en+", "Giri/Haji" to "en+")
"1899" to "en+", "1983" to "pl", "A Prophet" to "fr", "A Separation" to "fa", "A Tale of Two Sisters" to "ko",
"A Taxi Driver" to "ko", "Aguirre, the Wrath of God" to "de", "Alice in Borderland (2020)" to "ja",
"All Quiet on the Western Front" to "de", "All of Us Are Dead" to "ko", "Amélie" to "fr", "Anatomy of a Fall" to "fr",
"Andhadhun" to "hi", "Andrei Rublev" to "ru", "Another Round" to "da", "Argentina, 1985" to "es", "Attraction" to "ru",
"Audition" to "ja", "Baahubali: The Beginning" to "hi", "Battleship Potemkin" to "ru", "Better Than Us" to "ru",
"Black Orpheus" to "pt", "Black Spot" to "fr", "Bloodhounds (2023)" to "ko", "Blue Is the Warmest Color" to "fr",
"Borgen" to "da", "Breaking the Waves" to "en", "Burning" to "ko", "Cable Girls" to "es", "Caché" to "fr",
"Capernaum" to "ar", "Chungking Express" to "zh", "Cien Años De Soledad" to "es", "City of God" to "pt",
"Cold War" to "pl", "Crash Landing on You" to "ko", "Cronos" to "en+", "Cure" to "ja", "D.P." to "ko",
"Dancer in the Dark" to "en", "Dangal" to "hi", "Dark" to "de", "Dark Desire" to "es", "Dark Water" to "ja",
"Das Boot" to "de", "Decision to Leave" to "ko", "Delhi Crime" to "hi", "Downfall" to "de", "Drive My Car" to "ja",
"Elite" to "es", "Elite Squad" to "pt", "Ethos" to "tr", "Evil Does Not Exist" to "ja", "Exhuma" to "ko",
"Extraordinary Attorney Woo" to "ko", "Fauda" to "he", "First Love (2022)" to "ja", "Fitzcarraldo" to "de",
"Force Majeure" to "sv", "Galileo" to "ja", "Gannibal" to "ja", "Giri/Haji" to "en+", "Girl From Nowhere" to "th",
"Godzilla Minus One" to "ja", "Gomorrah" to "it", "Gyeongseong Creature" to "ko", "Hard Boiled" to "zh",
"Hardcore Henry" to "en", "Heeramandi: The Diamond Bazaar" to "hi", "Hellbound" to "ko", "Hera Pheri" to "hi",
"House of Ninjas" to "ja", "Ikiru" to "ja", "In the Mood for Love" to "zh", "Infernal Affairs" to "zh",
"Inside" to "fr", "Into the Night" to "fr", "Jean de Florette" to "fr", "Jodhaa Akbar" to "hi",
"Joint Security Area" to "ko", "Juvenile Justice" to "ko", "Kill" to "hi", "Kon-Tiki" to "no", "Kota Factory" to "hi",
"Kung Fu Hustle" to "zh", "Kwaidan" to "ja", "La Dolce Vita" to "it", "La Reina del Sur" to "es", "Lagaan" to "hi",
"Let the Right One In" to "sv", "Lupin" to "fr", "Léon: The Professional" to "en", "Ma mère" to "fr",
"Mediterraneo" to "it", "Memories of Murder" to "ko", "Midnight Diner" to "ja", "Midnight at the Pera Palace" to "tr",
"Money Heist" to "es", "Monsoon Wedding" to "en+", "Mother" to "ko", "Mr. Queen" to "ko",
"My Brilliant Friend" to "it", "My Mister" to "ko", "My Name" to "ko", "Nosferatu" to "en",
"OSS 117: Cairo, Nest of Spies" to "fr", "Okja" to "en+", "Oldboy" to "ko", "Ong-Bak" to "th", "Paatal Lok" to "hi",
"Pablo Escobar, The Drug Lord" to "es", "Panchayat" to "hi", "Parasite" to "ko", "Paris, Texas" to "en",
"Past Lives" to "en+", "Perfect Days" to "ja", "Persona" to "sv", "Portrait of a Lady on Fire" to "fr",
"Prison Playbook" to "ko", "Prisoners of War" to "he", "Pyaasa" to "hi", "Queen" to "hi", "Quicksand" to "sv",
"Ragnarok" to "no", "Raw" to "fr", "Red Cliff" to "zh", "Riders of Justice" to "da", "Rififi" to "fr",
"SKY Castle" to "ko", "Sacred Games" to "hi", "Scam 1992 - The Harshad Mehta Story" to "hi", "Seven Samurai" to "ja",
"Shin Godzilla" to "ja", "Shtisel" to "he", "Shōgun" to "en+", "Sleep" to "ko", "Snowpiercer" to "en",
"Solaris" to "ru", "Squid Game" to "ko", "Story of Yanxi Palace" to "zh", "Suspiria" to "en",
"Sympathy for Mr. Vengeance" to "ko", "Tehran" to "he", "Tetsuo: The Iron Man" to "ja", "The 8 Show" to "ko",
"The Cabinet of Dr. Caligari" to "en", "The Chaser" to "ko", "The Chestnut Man" to "da",
"The City of Lost Children" to "fr", "The Conformist" to "it", "The Days (2023)" to "ja", "The Family Man" to "hi",
"The Glory" to "ko", "The Host" to "ko", "The Intouchables" to "fr", "The Killer" to "zh", "The Killing" to "da",
"The Last Emperor" to "en", "The Law According to Lidia Poët" to "it",
"The Makanai: Cooking for the Maiko House" to "ja", "The Man from Nowhere" to "ko", "The Naked Director" to "ja",
"The Night Comes for Us" to "id", "The Orphanage" to "es", "The Raid" to "id", "The Rain" to "da",
"The Wailing" to "ko", "The Wandering Earth" to "zh", "The Wandering Earth II" to "zh", "The Wave" to "no",
"The Worst Person in the World" to "no", "The Yellow Sea" to "ko", "Timecrimes" to "es", "Titane" to "fr",
"To the Lake" to "ru", "Tokyo Swindlers" to "ja", "Train to Busan" to "ko", "Triangle of Sadness" to "en",
"Tribes of Europa" to "de", "Tumbbad" to "hi", "Under the Queen's Umbrella" to "ko", "Unnatural" to "ja",
"Velvet" to "es", "Veteran" to "ko", "Vincenzo" to "ko", "Volver" to "es", "Who Killed Sara?" to "es",
"Wolf Warrior 2" to "zh", "Y Tu Mamá También" to "es", "Yi Yi" to "zh", "[REC]" to "es",
"Signal" to "ko")
private val byKey: Map<String, String> by lazy { originals.mapKeys { (title, _) -> key(title) } }
/** A title as looked up: the programme's own part, without a year the library adds ("Alice in Borderland (2020)"). */
private fun key(title: String) = title.substringBefore(" / ").trim().replace(Regex(" \\(\\d{4}\\)$"), "").lowercase(java.util.Locale.ROOT)
/** The series or film a programme belongs to, from its title ("Squid Game / S1 E2 / Hell" → "Squid Game"). */
fun titleOf(programme: String): String = programme.substringBefore(" / ").trim()
/** ATLAS's rule for this programme, or null: another channel, or a title with no recorded original language. */
fun forProgramme(channel: Int?, programme: String): AtlasTracks? {
if (channel != ATLAS_NUMBER) return null
val original = originals[titleOf(programme)] ?: return null
/** ATLAS's rule for a series or film by its title, whichever channel asks (the pool reader, before anything is booked). */
fun forTitle(title: String): AtlasTracks? {
val original = byKey[key(title)] ?: return null
return if (original == "en+") AtlasTracks("en", subtitles = true) else AtlasTracks(original, subtitles = original != "en")
}
/** ATLAS's rule for this programme, or null: another channel, or a title with no recorded original language. */
fun forProgramme(channel: Int?, programme: String): AtlasTracks? = if (channel != ATLAS_NUMBER) null else forTitle(programme)
/** The sound track in the original language, or null when the file has none (then the title doesn't play this way). */
fun audioIndex(rule: AtlasTracks, audio: List<AtlasTrack>): Int? =
audio.indexOfFirst { language(it.language) == rule.original }.takeIf { it >= 0 }
@@ -68,6 +113,29 @@ internal object AtlasPlayback {
fun playable(rule: AtlasTracks, audio: List<AtlasTrack>, subtitles: List<AtlasTrack>): Boolean =
audioIndex(rule, audio) != null && (!rule.subtitles || subtitleIndex(rule, subtitles) != null)
/**
* Whether a library copy can be understood under the rule, from its own stream list: a sound track in the original
* language (an untagged one doesn't count: it can't be verified), and full English subtitles where needed. Used as ATLAS's
* pools are read, so a title or episode that fails never reaches a booking.
*/
fun sourceUnderstood(rule: AtlasTracks, source: org.json.JSONObject): Boolean {
val streams = source.optJSONArray("MediaStreams") ?: return false
val rows = (0 until minOf(streams.length(), 160)).mapNotNull { streams.optJSONObject(it) }
fun track(r: org.json.JSONObject) = AtlasTrack(r.optString("Language").takeIf { it.isNotBlank() },
listOf(r.optString("DisplayTitle"), r.optString("Title")).filter { it.isNotBlank() }.joinToString(" "), r.optBoolean("IsForced"))
return playable(rule, rows.filter { it.optString("Type") == "Audio" }.map(::track), rows.filter { it.optString("Type") == "Subtitle" }.map(::track))
}
/**
* The pool reader's check for a channel: null everywhere but ATLAS, where a copy must pass [sourceUnderstood] for its
* title's rule, and a title with no recorded original language passes nothing.
*/
fun sourceCheck(channel: Int, title: String): ((org.json.JSONObject) -> Boolean)? {
if (channel != ATLAS_NUMBER) return null
val rule = forTitle(title) ?: return { false }
return { source -> sourceUnderstood(rule, source) }
}
private fun mentions(label: String?, word: String) = label?.lowercase(java.util.Locale.ROOT)?.contains(word) == true
/** A language code as two letters, whichever form the file or Media3 gives (kor, ko, ko-KR, chi, zho, cmn, yue). */
@@ -56,6 +56,17 @@ internal val BlockIdents: Map<String, BlockIdent> = mapOf(
// The new channels' block idents (Paul, 24 November 2026), made in Blender: After Sundown on OUTLAW's own street at night,
// Frontline's Cost of War after sunset, Silver Screen's Hitchcock Nights and Orbit Stories' late block, After Hours.
"outlaw.sundown" to BlockIdent(R.raw.block_outlaw_sundown, R.raw.block_outlaw_sundown_sting),
// ATLAS (Paul's design kit, 24 November 2026): a block ident for each of its five dayparts and four film events, with quiet
// stings of one family (the kit's own clips are silent).
"atlas.mornings" to BlockIdent(R.raw.block_atlas_mornings, R.raw.block_atlas_mornings_sting),
"atlas.grandtour" to BlockIdent(R.raw.block_atlas_grandtour, R.raw.block_atlas_grandtour_sting),
"atlas.casefiles" to BlockIdent(R.raw.block_atlas_casefiles, R.raw.block_atlas_casefiles_sting),
"atlas.prime" to BlockIdent(R.raw.block_atlas_prime, R.raw.block_atlas_prime_sting),
"atlas.nightpassage" to BlockIdent(R.raw.block_atlas_nightpassage, R.raw.block_atlas_nightpassage_sting),
"atlas.premiere" to BlockIdent(R.raw.block_atlas_premiere, R.raw.block_atlas_premiere_sting),
"atlas.masters" to BlockIdent(R.raw.block_atlas_masters, R.raw.block_atlas_masters_sting),
"atlas.asiaextreme" to BlockIdent(R.raw.block_atlas_asiaextreme, R.raw.block_atlas_asiaextreme_sting),
"atlas.passport" to BlockIdent(R.raw.block_atlas_passport, R.raw.block_atlas_passport_sting),
"frontline.cost" to BlockIdent(R.raw.block_frontline_cost, R.raw.block_frontline_cost_sting),
"silver.hitchcock" to BlockIdent(R.raw.block_silver_hitchcock, R.raw.block_silver_hitchcock_sting),
"stories.afterhours" to BlockIdent(R.raw.block_stories_afterhours, R.raw.block_stories_afterhours_sting),
@@ -28,6 +28,7 @@ internal object ChannelBrands {
SILVER_SCREEN_NUMBER to ChannelBranding("orbit-silver-screen", "Silver Screen", R.drawable.orbit_silver_screen_epg, R.drawable.orbit_silver_screen_background, R.drawable.orbit_silver_screen_bug, ChannelCategory.Movies),
FRONTLINE_NUMBER to ChannelBranding("orbit-frontline", "Frontline", R.drawable.orbit_frontline_epg, R.drawable.orbit_frontline_background, R.drawable.orbit_frontline_bug, ChannelCategory.Movies),
OUTLAW_NUMBER to ChannelBranding("orbit-outlaw", "OUTLAW", R.drawable.orbit_outlaw_epg, R.drawable.orbit_outlaw_background, R.drawable.orbit_outlaw_bug, ChannelCategory.Movies),
ATLAS_NUMBER to ChannelBranding("orbit-atlas", "ATLAS", R.drawable.orbit_atlas_epg, R.drawable.orbit_atlas_background, R.drawable.orbit_atlas_bug, ChannelCategory.Entertainment),
AMERICANA_NUMBER to ChannelBranding("orbit-americana", "Americana", R.drawable.orbit_americana_epg, R.drawable.orbit_americana_background, R.drawable.orbit_americana_bug, ChannelCategory.Entertainment),
110 to ChannelBranding("orbit-unscripted", "Orbit Unscripted", R.drawable.orbit_unscripted_epg, R.drawable.orbit_unscripted_background, R.drawable.orbit_unscripted_bug, ChannelCategory.Entertainment),
CHRISTMAS_NUMBER to ChannelBranding("orbit-christmas", "Orbit Christmas", R.drawable.orbit_christmas_epg, R.drawable.orbit_christmas_background, R.drawable.orbit_christmas_bug, ChannelCategory.Movies),
@@ -9,7 +9,9 @@ internal data class ChannelPreset(val number: Int, val name: String, val searche
internal val DarkFilesCrime = listOf("Forensic Files", "Cold Case Files", "The First 48", "Making a Murderer", "The Staircase", "The Staircase (2004)", "The Jinx", "I Am a Killer", "Evil Lives Here", "Conversations with a Killer: The Ted Bundy Tapes", "Crime Scene: The Vanishing at the Cecil Hotel", "Crime Scene",
"Snapped", "American Justice", "City Confidential", "Homicide Hunter", "Homicide Hunter: Lt. Joe Kenda", "The Keepers", "Don't F**k with Cats: Hunting an Internet Killer", "The Confession Tapes", "Night Stalker: The Hunt for a Serial Killer",
"48 Hours", "Dateline NBC", "Tiger King", "Who Killed Sara?", "Time: The Kalief Browder Story")
"48 Hours", "Dateline NBC",
// Who Killed Sara? is a scripted thriller: its home is ATLAS (Paul, 24 November 2026).
"Tiger King", "Time: The Kalief Browder Story")
internal val DarkFilesMysteries = listOf("Unsolved Mysteries", "Wild Wild Country", "Dark Tourist", "Ancient Aliens", "In Search Of...", "Ancient Mysteries", "Mysteries at the Museum", "Mysteries of the Abandoned", "The Curse of Oak Island",
"Hangar 1: The UFO Files", "Unidentified: Inside America's UFO Investigation", "Expedition Unknown", "Finding Bigfoot", "Arthur C. Clarke's Mysterious World")
internal val DarkFilesParanormal = listOf("Paranormal Witness", "Most Haunted", "Ghost Adventures", "Ghost Hunters", "Hellier", "A Haunting", "The Dead Files", "Paranormal State", "Ghost Brothers", "Kindred Spirits", "Haunted", "Ghost Stories",
@@ -54,6 +56,7 @@ internal val ChannelPresets = listOf(
ChannelPreset(AMERICANA_NUMBER, "Americana", AmericanaShows, smartOnly = true),
// Orbit Stories (Paul, 23 November 2026): character-driven drama. See Stories.kt.
ChannelPreset(STORIES_NUMBER, "Orbit Stories", StoriesShows, smartOnly = true),
ChannelPreset(ATLAS_NUMBER, "ATLAS", AtlasShows, smartOnly = true),
ChannelPreset(CHRISTMAS_NUMBER, "Orbit Christmas", ChristmasFilms, smartOnly = true, films = true),
ChannelPreset(206, "Orbit Home", HomeShows, smartOnly = true),
ChannelPreset(108, "Orbit Play", PlayShows, smartOnly = true),
@@ -39,10 +39,19 @@ internal data class DayPart(val fromHour: Int, val toHour: Int, val titles: List
*/
val rotating: List<String>? = null, val rotateCap: Int = 0,
/** How many hours a week the rotation's own slot runs, so a long show counts only for what a week can hold. */
val rotateWeekHours: Int = 0) {
val rotateWeekHours: Int = 0,
/** A monthly event: only in this week of the month (1 = the first seven days), counted by the night it starts (ATLAS, 2026). */
val monthWeek: Int? = null) {
fun covers(hour: Int) = if (fromHour <= toHour) hour in fromHour until toHour else hour >= fromHour || hour < toHour
/** An event that runs past midnight belongs to the night it started, so its small hours count from the day before. */
fun covers(hour: Int, day: java.time.DayOfWeek) = covers(hour) && (days.isEmpty() || (if (fromHour > toHour && hour < toHour) day.minus(1) else day) in days)
/** [covers], with a monthly event kept to its week of the month. */
fun covers(time: java.time.ZonedDateTime): Boolean {
if (!covers(time.hour, time.dayOfWeek)) return false
val week = monthWeek ?: return true
val night = if (fromHour > toHour && time.hour < toHour) time.toLocalDate().minusDays(1) else time.toLocalDate()
return (night.dayOfMonth - 1) / 7 + 1 == week
}
}
/** What makes a channel itself. The engine below knows nothing about any particular channel. */
@@ -238,7 +247,10 @@ private val BuiltInChannels = listOf(
ChannelPresets.filter { it.smartOnly }.map { ChannelProgramming(it.number, it.name, it.searches, seriesCount = if (it.films) it.searches.size else maxOf(60, it.searches.size), finishTogether = !it.films, exactTitles = true,
filmRestMs = if (it.films) 7 * 24 * 60 * 60_000L else null,
suggestionRules = SmartChannelRules[it.number].orEmpty(), dayParts = SmartChannelParts[it.number].orEmpty(), shuffleTitles = SmartChannelMixed[it.number].orEmpty(),
channelFilms = if (it.number == 401) PpvSunday else emptyList(), tierWeights = SmartChannelTiers[it.number], adaptiveFilmRest = it.number in AdaptiveFilmRestChannels,
// ATLAS (24 November 2026) plays international programmes in their own language: no English-sound filter; its own
// rule ([AtlasPlayback]) is applied as its pools are read instead.
englishAudio = it.number != ATLAS_NUMBER,
channelFilms = if (it.number == 401) PpvSunday else if (it.number == ATLAS_NUMBER) AtlasFilms else emptyList(), tierWeights = SmartChannelTiers[it.number], adaptiveFilmRest = it.number in AdaptiveFilmRestChannels,
catalogueScaleHours = if (it.number in CatalogueScaledChannels) CATALOGUE_SCALE_HOURS else null,
catalogueScaleFloor = CatalogueScaleFloors[it.number] ?: MIN_CATALOGUE_SCALE, storyGrouping = it.number in StoryGroupingChannels,
shorts = if (it.number == 605) ToonZShorts else null) }
@@ -249,7 +261,7 @@ private val BuiltInChannels = listOf(
* other series channel since 5 November 2026 (Paul: part ones first, everywhere): weighted blocks book a story whole, and a
* mixed show in equal turns keeps it whole and in order in its deck.
*/
private val StoryGroupingChannels get() = setOf(101, 102, 103, 104, 105, 107, 108, 109, 110, AMERICANA_NUMBER, STORIES_NUMBER, 202, 203, 204, 205, 206, 401, 602, 603, 604, 605, 611)
private val StoryGroupingChannels get() = setOf(101, 102, 103, 104, 105, 107, 108, 109, 110, AMERICANA_NUMBER, STORIES_NUMBER, ATLAS_NUMBER, 202, 203, 204, 205, 206, 401, 602, 603, 604, 605, 611)
/**
* Where a short series must keep at least half its tier's weight, so the hybrid trims its weekly repeats without cutting its
@@ -262,7 +274,7 @@ private val AdaptiveFilmRestChannels get() = setOf(301)
/** Editorially weighted rotation, per channel, once its tiers are approved: Orbit Three (0.97.0), Odyssey, Wild, Orbit X and ToonZ (0.98.0), then Orbit 1, Orbit 2, Gold, Evidence and Heroes (0.99.4; Vortex and Paradox are set above). */
private val SmartChannelTiers: Map<Int, Map<String, Double>> get() = mapOf(103 to ThreeTiers, 202 to OdysseyTiers, 203 to WildTiers, 603 to OrbitXTiers, 605 to ToonZTiers,
101 to Orbit1Tiers, 102 to Orbit2Tiers, 104 to GoldTiers, 108 to PlayTiers, STORIES_NUMBER to StoriesTiers, 107 to EvidenceTiers, 602 to HeroesTiers, 604 to RewindTiers, 204 to DarkFilesTiers)
101 to Orbit1Tiers, 102 to Orbit2Tiers, 104 to GoldTiers, 108 to PlayTiers, STORIES_NUMBER to StoriesTiers, ATLAS_NUMBER to AtlasTiers, 107 to EvidenceTiers, 602 to HeroesTiers, 604 to RewindTiers, 204 to DarkFilesTiers)
/**
* Weighted channels whose short catalogues are scaled down ([ChannelProgramming.catalogueScaleHours]): Rewind and Dark Files,
@@ -274,13 +286,13 @@ private val CatalogueScaledChannels get() = setOf(604, 204, 103, 202, 605)
private val SmartChannelMixed: Map<Int, Set<String>> get() = mapOf(101 to Orbit1Mixed, 102 to Orbit2Mixed, 103 to ThreeMixed, 104 to GoldMixed, 105 to RiotMixed,
602 to HeroesMixed, 603 to OrbitXMixed, 604 to RewindMixed, 605 to ToonZMixed,
203 to WildMixed, 202 to OdysseyMixed, 107 to EvidenceMixed, 611 to JuniorMixed,
205 to KitchenShows.toSet(), 206 to HomeShows.toSet(), 108 to PlayShows.toSet(), 110 to UnscriptedMixed, AMERICANA_NUMBER to AmericanaMixed)
205 to KitchenShows.toSet(), 206 to HomeShows.toSet(), 108 to PlayShows.toSet(), 110 to UnscriptedMixed, AMERICANA_NUMBER to AmericanaMixed, ATLAS_NUMBER to AtlasMixed)
/** Dark Files, from the programming bible: crime by day, mysteries early evening, the paranormal late. */
private val SmartChannelParts: Map<Int, List<DayPart>> get() = mapOf(101 to Orbit1DayParts, 102 to Orbit2DayParts, 103 to ThreeDayParts, 104 to GoldDayParts, 105 to RiotDayParts, 304 to HorrorDayParts,
602 to HeroesDayParts, 603 to OrbitXDayParts, 604 to RewindDayParts, 605 to ToonZDayParts, 204 to DarkFilesDayParts, 203 to WildDayParts, 202 to OdysseyDayParts, 107 to EvidenceDayParts,
401 to RingXDayParts, 611 to JuniorDayParts, 205 to KitchenDayParts, 206 to HomeDayParts, 108 to PlayDayParts,
109 to SignatureDayParts, 110 to UnscriptedDayParts, CHRISTMAS_NUMBER to ChristmasDayParts, AMERICANA_NUMBER to AmericanaDayParts, OUTLAW_NUMBER to OutlawDayParts, SILVER_SCREEN_NUMBER to SilverScreenDayParts, STORIES_NUMBER to StoriesDayParts)
109 to SignatureDayParts, 110 to UnscriptedDayParts, CHRISTMAS_NUMBER to ChristmasDayParts, AMERICANA_NUMBER to AmericanaDayParts, ATLAS_NUMBER to AtlasDayParts, OUTLAW_NUMBER to OutlawDayParts, SILVER_SCREEN_NUMBER to SilverScreenDayParts, STORIES_NUMBER to StoriesDayParts)
/** Optional bigger pools, only used once reviewed. No rule for Orbit Gold or Orbit Three: nothing in the library's details can tell a British sitcom apart. */
private val SmartChannelRules: Map<Int, List<SuggestionRule>> get() = mapOf(
@@ -412,7 +424,7 @@ private object PartPools {
internal fun dayPartFor(pool: List<PoolSeries>, parts: List<DayPart>, startMs: Long, zone: java.time.ZoneId): Triple<List<PoolSeries>, String, DayPart?> {
val local = java.time.Instant.ofEpochMilli(startMs).atZone(zone)
// An event with nothing to show gives way to the ordinary block for that time.
for (part in parts.filter { it.covers(local.hour, local.dayOfWeek) }) {
for (part in parts.filter { it.covers(local) }) {
val name = (if (part.days.isNotEmpty()) "event " else "block ") + part.group.ifEmpty { "${part.fromHour}-${part.toHour}" }
if (part.titles.isEmpty() && part.group.isEmpty()) return Triple(pool, name, part)
val allowed = PartPools.of(pool, part) {
@@ -1322,7 +1334,7 @@ internal fun presentationOf(entry: ScheduleEntry, parts: List<DayPart>, zone: ja
if (recorded.isEmpty()) return ""
val local = java.time.Instant.ofEpochMilli(entry.startMs).atZone(zone)
val matches = parts.filter { part ->
part.key.isNotEmpty() && part.covers(local.hour, local.dayOfWeek) &&
part.key.isNotEmpty() && part.covers(local) &&
recorded == (if (part.days.isNotEmpty()) "event " else "block ") + part.group.ifEmpty { "${part.fromHour}-${part.toHour}" }
}
return matches.singleOrNull()?.key.orEmpty()
@@ -419,7 +419,7 @@ internal class EmbySampleSession(private val transport: EmbyTransport, private v
if (!hasSeries(title)) continue
requests++
val match = searchSeries(transport, userId, ::currentToken, title).candidates.filter { seriesKey(it.title) == seriesKey(title) }.take(MAX_SERIES_COPIES)
val read = match.map { copy -> readWholeSeries(transport, userId, ::currentToken, copy, checkActive, onRequest = { requests++ }, canDecode = BoxDecoders::canDecode, englishAudio = programming.englishAudio) }
val read = match.map { copy -> readWholeSeries(transport, userId, ::currentToken, copy, checkActive, onRequest = { requests++ }, canDecode = BoxDecoders::canDecode, englishAudio = programming.englishAudio, sourceOk = AtlasPlayback.sourceCheck(programming.number, copy.title)) }
val best = read.maxByOrNull { it.episodes.size }?.takeIf { it.episodes.isNotEmpty() }
android.util.Log.i("OrbitSchedule", "channel=${programming.number} series=\"$title\" copies=${match.size} episodes=${best?.episodes?.size ?: 0}")
if (best != null) pool += best
@@ -449,7 +449,7 @@ internal class EmbySampleSession(private val transport: EmbyTransport, private v
// A copy taken off the channel by editorial decision is never read, so it can't stand in for the one chosen.
val copies = (listOf(match) + candidates.filter { it.id != match.id && seriesKey(it.title) == seriesKey(match.title) }.sortedBy { it.year ?: Int.MAX_VALUE })
.filter { it.id !in programming.withdrawn }.take(MAX_SERIES_COPIES)
val read = try { traced("read") { copies.map { copy -> readWholeSeries(transport, userId, ::currentToken, copy, checkActive, onRequest = { requests++ }, canDecode = BoxDecoders::canDecode, englishAudio = programming.englishAudio) } } }
val read = try { traced("read") { copies.map { copy -> readWholeSeries(transport, userId, ::currentToken, copy, checkActive, onRequest = { requests++ }, canDecode = BoxDecoders::canDecode, englishAudio = programming.englishAudio, sourceOk = AtlasPlayback.sourceCheck(programming.number, copy.title)) } } }
catch (failure: EmbyCheckException) {
val kept = partial.carry(seriesKey(match.title), failure)
if (pool.none { it.id == kept.id }) pool += kept
@@ -465,7 +465,8 @@ internal class EmbySampleSession(private val transport: EmbyTransport, private v
checkActive()
if (!hasFilm(entry)) continue
requests++
val lookup = findFilm(transport, userId, ::currentToken, entry, BoxDecoders::canDecode)
val lookup = findFilm(transport, userId, ::currentToken, entry, BoxDecoders::canDecode,
AtlasPlayback.sourceCheck(programming.number, FilmIdentity.of(entry).title) ?: { true })
if (lookup.note.isNotEmpty()) android.util.Log.i("OrbitSchedule", "channel=${programming.number} ${lookup.note}")
val film = lookup.film ?: continue
if (pool.none { it.id == film.id }) pool += film
@@ -504,7 +505,7 @@ internal class EmbySampleSession(private val transport: EmbyTransport, private v
val (source, duration) = found ?: continue
pool += PoolSeries(accepted.id, accepted.title, listOf(PoolEpisode(accepted.id, source, EpisodeMark(1, 1), accepted.title, duration)), accepted.group, year = accepted.year)
} else {
fun read(id: String) = readWholeSeries(transport, userId, ::currentToken, SeriesCandidate(id, accepted.title, accepted.year, ""), checkActive, onRequest = { requests++ }, canDecode = BoxDecoders::canDecode, englishAudio = programming.englishAudio)
fun read(id: String) = readWholeSeries(transport, userId, ::currentToken, SeriesCandidate(id, accepted.title, accepted.year, ""), checkActive, onRequest = { requests++ }, canDecode = BoxDecoders::canDecode, englishAudio = programming.englishAudio, sourceOk = AtlasPlayback.sourceCheck(programming.number, accepted.title))
// A series whose item has gone (renumbered, or moved from another server) is found again by its provider ID,
// one request, only when reading it by its saved ID fails or finds nothing (18 November 2026).
fun refind(): PoolSeries? {
@@ -50,9 +50,12 @@ internal const val WHOLE_SERIES_TIMEOUT_MS = 60_000
/** A whole series, read in bounded pages one at a time: regular numbered episodes with a playable source, once each, in order. */
internal fun readWholeSeries(transport: EmbyTransport, userId: String, token: () -> String, series: SeriesCandidate,
checkActive: () -> Unit = {}, onRequest: () -> Unit = {}, canDecode: (String) -> Boolean = { true }, englishAudio: Boolean = false): PoolSeries {
checkActive: () -> Unit = {}, onRequest: () -> Unit = {}, canDecode: (String) -> Boolean = { true }, englishAudio: Boolean = false,
/** ATLAS's rule for a copy ([AtlasPlayback.sourceUnderstood]): the series then plays only up to its first episode that fails it. */
sourceOk: ((org.json.JSONObject) -> Boolean)? = null): PoolSeries {
require(EmbyClient.validId(userId) && EmbyClient.validId(series.id))
val episodes = mutableListOf<PoolEpisode>()
val listed = mutableSetOf<EpisodeMark>()
var start = 0
while (start < WHOLE_SERIES_MAX_EPISODES) {
checkActive()
@@ -68,14 +71,37 @@ internal fun readWholeSeries(transport: EmbyTransport, userId: String, token: ()
EmbyClient.expectSuccess(reply.status, false)
val body = EmbyClient.parse(reply.body)
val rows = body.optJSONArray("Items") ?: throw EmbyCheckException("The provider did not return the episode list.")
(0 until rows.length()).forEach { index -> rows.optJSONObject(index)?.let { poolEpisode(it, canDecode, englishAudio) }?.let { episodes += it } }
(0 until rows.length()).forEach { index -> rows.optJSONObject(index)?.let { row ->
if (sourceOk != null && row.optString("Type") == "Episode" && row.optInt("ParentIndexNumber", -1) >= 1 && row.optInt("IndexNumber", -1) >= 1)
listed += EpisodeMark(row.optInt("ParentIndexNumber"), row.optInt("IndexNumber"))
poolEpisode(row, canDecode, englishAudio, sourceOk)?.let { episodes += it } } }
start += rows.length()
if (rows.length() == 0 || start >= body.optInt("TotalRecordCount", 0)) break
}
return PoolSeries(series.id, series.title, episodes.sortedBy { it.mark }.distinctBy { it.mark }, ref = series.ref, year = series.year)
val ordered = episodes.sortedBy { it.mark }.distinctBy { it.mark }
return PoolSeries(series.id, series.title, if (sourceOk == null) ordered else clearRun(ordered, listed), ref = series.ref, year = series.year)
}
internal fun poolEpisode(item: org.json.JSONObject, canDecode: (String) -> Boolean, englishAudio: Boolean): PoolEpisode? {
/**
* ATLAS (Paul, 24 November 2026): a serial is never broadcast past an episode that can't be understood, so a series keeps only
* its unbroken run from its first episode: it stops at the first episode the library lists that failed, or at a gap in the
* numbering (a missing episode or season).
*/
internal fun clearRun(passed: List<PoolEpisode>, listed: Set<EpisodeMark>): List<PoolEpisode> {
val ok = passed.associateBy { it.mark }
val run = mutableListOf<PoolEpisode>()
var before: EpisodeMark? = null
for (mark in listed.sorted()) {
val follows = before?.let { b -> (mark.season == b.season && mark.episode == b.episode + 1) || (mark.season == b.season + 1 && mark.episode == 1) } ?: (mark.episode == 1)
val episode = ok[mark]
if (!follows || episode == null) break
run += episode
before = mark
}
return run
}
internal fun poolEpisode(item: org.json.JSONObject, canDecode: (String) -> Boolean, englishAudio: Boolean, sourceOk: ((org.json.JSONObject) -> Boolean)? = null): PoolEpisode? {
val id = item.optString("Id")
val season = item.optInt("ParentIndexNumber", -1)
val number = item.optInt("IndexNumber", -1)
@@ -83,7 +109,7 @@ internal fun poolEpisode(item: org.json.JSONObject, canDecode: (String) -> Boole
val sources = item.optJSONArray("MediaSources") ?: return null
val allowAvi = aviAllowedFor(item.optString("SeriesName"))
val source = (0 until minOf(sources.length(), 20)).mapNotNull { sources.optJSONObject(it) }
.firstOrNull { supportedDirectContainer(it.optString("Container"), allowAvi) != null && EmbyClient.validId(it.optString("Id")) && sourceVideoCodec(it)?.let(canDecode) != false && (!englishAudio || hasEnglishAudio(it)) } ?: return null
.firstOrNull { supportedDirectContainer(it.optString("Container"), allowAvi) != null && EmbyClient.validId(it.optString("Id")) && sourceVideoCodec(it)?.let(canDecode) != false && (!englishAudio || hasEnglishAudio(it)) && sourceOk?.invoke(it) != false } ?: return null
val ticks = source.optLong("RunTimeTicks", 0).takeIf { it > 0 } ?: item.optLong("RunTimeTicks", 0)
val duration = (ticks / 10_000).takeIf { it in 1_000..SampleChannel.MAX_DURATION_MS } ?: return null
return PoolEpisode(id, source.getString("Id"), EpisodeMark(season, number), EmbyClient.clean(item.optString("Name"), 160).ifBlank { "Untitled episode" }, duration)
@@ -95,7 +121,9 @@ private const val FILM_SEARCH_PAGE = 50
private const val FILM_SEARCH_PAGES = 4
/** The film a list entry means, and the copy of it this box can play. See [resolveFilm]. */
internal fun findFilm(transport: EmbyTransport, userId: String, token: () -> String, entry: String, canDecode: (String) -> Boolean = { true }): FilmLookup {
internal fun findFilm(transport: EmbyTransport, userId: String, token: () -> String, entry: String, canDecode: (String) -> Boolean = { true },
/** ATLAS's rule for a copy: a copy that fails it is passed over, as one this box can't play is. */
sourceOk: (org.json.JSONObject) -> Boolean = { true }): FilmLookup {
require(EmbyClient.validId(userId))
val identity = FilmIdentity.of(entry)
val term = java.net.URLEncoder.encode(identity.title, "UTF-8")
@@ -111,5 +139,5 @@ internal fun findFilm(transport: EmbyTransport, userId: String, token: () -> Str
(0 until minOf(rows.length(), FILM_SEARCH_PAGE)).mapNotNullTo(candidates) { rows.optJSONObject(it)?.let(::filmCandidate) }
if (rows.length() < FILM_SEARCH_PAGE || (page + 1) * FILM_SEARCH_PAGE >= body.optInt("TotalRecordCount", Int.MAX_VALUE)) break
}
return resolveFilm(identity, candidates, canDecode)
return resolveFilm(identity, candidates, canDecode, sourceOk)
}
@@ -14,8 +14,8 @@ internal data class FilmIdentity(val title: String, val year: Int? = null, val i
private val withYear = Regex("""^(.*\S)\s+\((\d{4})\)$""")
fun of(entry: String): FilmIdentity {
val trimmed = entry.trim()
val match = withYear.matchEntire(trimmed) ?: return FilmIdentity(trimmed, imdb = FilmImdb[trimmed] ?: OutlawImdb[trimmed] ?: NewChannelImdb[trimmed])
return FilmIdentity(match.groupValues[1], match.groupValues[2].toInt(), FilmImdb[trimmed] ?: OutlawImdb[trimmed] ?: NewChannelImdb[trimmed])
val match = withYear.matchEntire(trimmed) ?: return FilmIdentity(trimmed, imdb = FilmImdb[trimmed] ?: OutlawImdb[trimmed] ?: NewChannelImdb[trimmed] ?: AtlasImdb[trimmed])
return FilmIdentity(match.groupValues[1], match.groupValues[2].toInt(), FilmImdb[trimmed] ?: OutlawImdb[trimmed] ?: NewChannelImdb[trimmed] ?: AtlasImdb[trimmed])
}
}
}
@@ -40,7 +40,7 @@ private fun filmCount(candidates: List<FilmCandidate>): Int {
* Which film the identity means, then which copy of it this box can play. Never another film in its place:
* if the right one can't be found or played, there's no film, and the channel simply schedules its others.
*/
internal fun resolveFilm(identity: FilmIdentity, candidates: List<FilmCandidate>, canDecode: (String) -> Boolean = { true }): FilmLookup {
internal fun resolveFilm(identity: FilmIdentity, candidates: List<FilmCandidate>, canDecode: (String) -> Boolean = { true }, sourceOk: (JSONObject) -> Boolean = { true }): FilmLookup {
val named = candidates.filter { seriesKey(it.name) == seriesKey(identity.title) }.distinctBy { it.id }
if (named.isEmpty()) return FilmLookup(null, "film=\"${identity.label}\" missing: not in the library")
val years = named.mapNotNull { it.year }.distinct().sorted()
@@ -64,7 +64,7 @@ internal fun resolveFilm(identity: FilmIdentity, candidates: List<FilmCandidate>
// doesn't fall behind or drift out of sync (American Werewolf's 54 Mbps 4K copy did; its 10 Mbps 1080p copy was there).
val passed = mutableListOf<String>()
for (copy in film.sortedWith(compareBy<FilmCandidate> { copyWeight(it) }.thenBy { it.id })) {
val source = copy.sources.firstOrNull { supportedDirectContainer(it.optString("Container")) != null && EmbyClient.validId(it.optString("Id")) && sourceVideoCodec(it)?.let(canDecode) != false }
val source = copy.sources.firstOrNull { supportedDirectContainer(it.optString("Container")) != null && EmbyClient.validId(it.optString("Id")) && sourceVideoCodec(it)?.let(canDecode) != false && sourceOk(it) }
if (source == null) { passed += "${copy.id} ${if (copy.sources.isEmpty()) "no media" else "can't play here"}"; continue }
val ticks = source.optLong("RunTimeTicks", 0).takeIf { it > 0 } ?: copy.runTimeTicks
val duration = (ticks / 10_000).takeIf { it in 1_000..SampleChannel.MAX_DURATION_MS }
@@ -34,7 +34,7 @@ internal const val ONE_STREAM_HANDOVER_MS = 800L
internal const val IDENT_HOLD_MS = 6_000L
private const val IDENT_SHORTEST_PROGRAMME_MS = 3 * 60_000L
private val IdentVideos = mapOf(AMERICANA_NUMBER to R.raw.ident_111, OUTLAW_NUMBER to R.raw.ident_311, STORIES_NUMBER to R.raw.ident_112, SILVER_SCREEN_NUMBER to R.raw.ident_312, FRONTLINE_NUMBER to R.raw.ident_313, 108 to R.raw.ident_108, 109 to R.raw.ident_109, 110 to R.raw.ident_110, CHRISTMAS_NUMBER to R.raw.ident_310, 205 to R.raw.ident_205, 206 to R.raw.ident_206, 101 to R.raw.ident_101, 102 to R.raw.ident_102, 103 to R.raw.ident_103, 104 to R.raw.ident_104, 105 to R.raw.ident_105, 106 to R.raw.ident_106, 107 to R.raw.ident_107,
private val IdentVideos = mapOf(ATLAS_NUMBER to R.raw.ident_113, AMERICANA_NUMBER to R.raw.ident_111, OUTLAW_NUMBER to R.raw.ident_311, STORIES_NUMBER to R.raw.ident_112, SILVER_SCREEN_NUMBER to R.raw.ident_312, FRONTLINE_NUMBER to R.raw.ident_313, 108 to R.raw.ident_108, 109 to R.raw.ident_109, 110 to R.raw.ident_110, CHRISTMAS_NUMBER to R.raw.ident_310, 205 to R.raw.ident_205, 206 to R.raw.ident_206, 101 to R.raw.ident_101, 102 to R.raw.ident_102, 103 to R.raw.ident_103, 104 to R.raw.ident_104, 105 to R.raw.ident_105, 106 to R.raw.ident_106, 107 to R.raw.ident_107,
201 to R.raw.ident_201, 202 to R.raw.ident_202, 203 to R.raw.ident_203, 204 to R.raw.ident_204, 301 to R.raw.ident_301, 302 to R.raw.ident_302, 303 to R.raw.ident_303, 304 to R.raw.ident_304, 305 to R.raw.ident_305,
306 to R.raw.ident_306, 307 to R.raw.ident_307, 308 to R.raw.ident_308, 309 to R.raw.ident_309, 401 to R.raw.ident_401, 601 to R.raw.ident_601, 602 to R.raw.ident_602, 603 to R.raw.ident_603, 604 to R.raw.ident_604, 605 to R.raw.ident_605,
611 to R.raw.ident_611, 612 to R.raw.ident_612, 613 to R.raw.ident_613)
Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,82 @@
package tv.orbit.classic
import org.json.JSONArray
import org.json.JSONObject
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertTrue
import org.junit.Test
import java.time.ZoneId
/** ATLAS, channel 113 (Paul, 24 and 25 November 2026). */
class AtlasChannelTest {
private val zone = ZoneId.of("Europe/London")
@Test fun everyTitleHasItsOriginalLanguageAndEveryFilmItsIdentity() {
AtlasShows.forEach { assertNotNull("$it has no original language", AtlasPlayback.forTitle(it)) }
AtlasFilms.forEach { entry ->
val film = FilmIdentity.of(entry)
assertNotNull("$entry has no year", film.year)
assertNotNull("$entry has no IMDb ID", film.imdb)
assertNotNull("$entry has no original language", AtlasPlayback.forTitle(film.title))
}
assertEquals(75 - 4, AtlasShows.size) // Das Boot, The Chestnut Man, 1983 and Tribes of Europa failed the sound check
assertEquals(116, AtlasFilms.size)
}
@Test fun aLibraryYearInTheNameStillFindsTheRule() {
assertEquals(AtlasTracks("ja", true), AtlasPlayback.forTitle("Alice in Borderland (2020) / S1 E1 / Episode 1"))
assertEquals(AtlasTracks("en", true), AtlasPlayback.forTitle("Shōgun"))
assertEquals(AtlasTracks("en", false), AtlasPlayback.forTitle("Paris, Texas"))
}
@Test fun theMonthlyEventsKeepToTheirWeek() {
val extreme = AtlasDayParts.first { it.key == "atlas.asiaextreme" }
fun at(d: Int, h: Int) = java.time.LocalDate.of(2026, 12, d).atTime(h, 30).atZone(zone)
assertTrue(extreme.covers(at(4, 23))) // the first Friday of December
assertTrue(extreme.covers(at(5, 1))) // its small hours, Saturday (a double bill, starting by 02:00)
assertFalse(extreme.covers(at(11, 23))) // the second Friday
assertFalse(extreme.covers(at(12, 1)))
val passport = AtlasDayParts.first { it.key == "atlas.passport" }
assertTrue(passport.covers(at(6, 21))); assertFalse(passport.covers(at(13, 21)))
}
@Test fun nothingAdultBeforeTheWatershed() {
val night = AtlasDayParts.first { it.key == "atlas.nightpassage" }.titles.toSet()
AtlasDayParts.filter { it.days.isEmpty() && it.fromHour in 6..20 }.forEach { part -> assertTrue(part.titles.none { it in night }) }
assertFalse("Who Killed Sara?" in DarkFilesCrime)
assertTrue("Who Killed Sara?" in night)
}
@Test fun aSerialStopsAtItsFirstUnclearEpisode() {
fun ep(s: Int, e: Int) = PoolEpisode("$s$e", "src$s$e", EpisodeMark(s, e), "E$e", 3_000_000)
val listed = setOf(EpisodeMark(1, 1), EpisodeMark(1, 2), EpisodeMark(1, 3), EpisodeMark(2, 1), EpisodeMark(2, 2))
// Episode 1.3 failed: the run is 1.1 and 1.2, though season 2 passed.
assertEquals(listOf(EpisodeMark(1, 1), EpisodeMark(1, 2)), clearRun(listOf(ep(1, 1), ep(1, 2), ep(2, 1), ep(2, 2)), listed).map { it.mark })
// A missing episode in the library is a gap too.
assertEquals(listOf(EpisodeMark(1, 1)), clearRun(listOf(ep(1, 1), ep(1, 3)), setOf(EpisodeMark(1, 1), EpisodeMark(1, 3))).map { it.mark })
// A full run passes whole, across seasons.
assertEquals(5, clearRun(listed.map { ep(it.season, it.episode) }, listed).size)
// Nothing from the first episode: nothing at all.
assertTrue(clearRun(listOf(ep(1, 2)), listed).isEmpty())
}
private fun source(vararg streams: JSONObject) = JSONObject().put("MediaStreams", JSONArray(streams.toList()))
private fun audio(lang: String) = JSONObject().put("Type", "Audio").put("Language", lang)
private fun sub(lang: String, title: String, forced: Boolean = false) = JSONObject().put("Type", "Subtitle").put("Language", lang).put("DisplayTitle", title).put("IsForced", forced)
@Test fun aCopyIsCheckedFromItsOwnStreams() {
val squid = AtlasPlayback.forTitle("Squid Game")!!
assertTrue(AtlasPlayback.sourceUnderstood(squid, source(audio("ger"), audio("kor"), audio("eng"), sub("eng", "English (Forced SUBRIP)", true), sub("eng", "English (SUBRIP)"))))
// Forced English alone isn't enough, whether flagged or only labelled.
assertFalse(AtlasPlayback.sourceUnderstood(squid, source(audio("kor"), sub("eng", "English (Forced SUBRIP)", true))))
assertFalse(AtlasPlayback.sourceUnderstood(squid, source(audio("kor"), sub("eng", "English Forced"))))
// Untagged sound can't be verified as the original.
assertFalse(AtlasPlayback.sourceUnderstood(squid, source(audio(""), sub("eng", "English (SUBRIP)"))))
assertFalse(AtlasPlayback.sourceUnderstood(squid, JSONObject()))
// Every other channel reads its pools as before.
assertEquals(null, AtlasPlayback.sourceCheck(112, "Squid Game"))
assertFalse(AtlasPlayback.sourceCheck(ATLAS_NUMBER, "A Title Nobody Recorded")!!.invoke(source(audio("kor"), sub("eng", "English"))))
}
}
@@ -16,6 +16,18 @@ class AtlasWeekPreviewTest {
val dir = System.getenv("ATLAS_WEEK")?.let(::File)
assumeTrue(dir != null && dir.isDirectory)
val pool = ScheduleStore(dir!!).loadPool("8d5f95222bdd4ad3b841f53e18c25056", 113)!!.series
// ATLAS_REAL=1 plans with the channel's own blocks and tiers (Atlas.kt), as the TV would; otherwise the audit's parts.json.
if (System.getenv("ATLAS_REAL") == "1") {
val zone = ZoneId.of("Europe/London")
val from = java.time.LocalDate.of(2026, 11, 30).atStartOfDay(zone).toInstant().toEpochMilli()
val plan = extendByBlock(pool, ScheduleCursor(), from, from + 7 * 24 * 60 * 60_000L, { AtlasTiers[seriesKey(it.title)] ?: TIER_CORE }, AtlasDayParts, zone,
{ _, _, _ -> false }, false, { it.title in AtlasMixed }, true, stories = true)
File(dir, "week-real.tsv").writeText(plan.entries.joinToString("\n") { e ->
val t = java.time.Instant.ofEpochMilli(e.startMs).atZone(zone)
"${t.dayOfWeek}\t${t.toLocalTime()}\t${e.media.durationMs / 60_000}\t${e.media.item.title}\t${e.why.substringBefore(";")}\t${e.presentation}"
})
return
}
val spec = JSONObject(File(dir, "parts.json").readText())
val parts = spec.getJSONArray("parts").let { a -> (0 until a.length()).map { i -> a.getJSONObject(i) } }.map { p ->
val titles = p.getJSONArray("titles").let { t -> (0 until t.length()).map { t.getString(it) } }
@@ -168,7 +168,7 @@ class ChannelPresetsTest {
assertEquals(ChannelCategory.Sport, ChannelBrands.forNumber(401)!!.category)
// Kitchen, Home and Play joined on 6 November 2026.
// Americana, OUTLAW, Orbit Stories, Silver Screen and Frontline joined on 23 November 2026.
assertEquals(41, SmartChannels.size)
assertEquals(42, SmartChannels.size)
}
@Test fun ringXKeepsItsWeeknightsAndFallsBackToTheVault() {
@@ -199,7 +199,7 @@ class ChannelPresetsTest {
@Test fun everySmartChannelIsBrandedAndNumberedAfterTheMove() {
SmartChannels.forEach { assertNotNull("${it.name} has no brand at ${it.number}", ChannelBrands.forNumber(it.number)) }
assertEquals(OldChannelNumbers.values.toSet() - DRIVE_IN_NUMBER + 101 + TOTS_NUMBER + setOf(108, 109, 110, 205, 206, CHRISTMAS_NUMBER, AMERICANA_NUMBER, OUTLAW_NUMBER, STORIES_NUMBER, SILVER_SCREEN_NUMBER, FRONTLINE_NUMBER), SmartChannels.map { it.number }.toSet())
assertEquals(OldChannelNumbers.values.toSet() - DRIVE_IN_NUMBER + 101 + TOTS_NUMBER + setOf(108, 109, 110, 205, 206, CHRISTMAS_NUMBER, AMERICANA_NUMBER, OUTLAW_NUMBER, STORIES_NUMBER, SILVER_SCREEN_NUMBER, FRONTLINE_NUMBER, ATLAS_NUMBER), SmartChannels.map { it.number }.toSet())
}
@Test fun kitchenHomeAndPlayAreBrandedInTheirBlocks() {
@@ -270,7 +270,8 @@ class ChannelPresetsTest {
assertFalse(inSeason(CHRISTMAS_NUMBER, at(1, 1), zone)); assertFalse(inSeason(CHRISTMAS_NUMBER, at(10, 31), zone))
assertTrue(inSeason(109, at(1, 1), zone))
// No show another channel carries, so each keeps its identity: only Band of Brothers, which Odyssey keeps listed but in no block.
val others = SmartChannels.filter { it.number !in setOf(109, 110, CHRISTMAS_NUMBER) }.flatMap { it.searches }.toSet() - "Band of Brothers"
// ATLAS's guests, Shōgun and Dark, are Paul's own exception (24 November 2026): Signature stays their home.
val others = SmartChannels.filter { it.number !in setOf(109, 110, CHRISTMAS_NUMBER) }.flatMap { it.searches }.toSet() - "Band of Brothers" - "Shōgun" - "Dark"
assertTrue((SignatureShows + UnscriptedShows).none { it in others })
}
}
@@ -84,8 +84,9 @@ class PpvSundayTest {
assertTrue("fitted shows: $before", before.distinct().size > 1)
}
@Test fun onlyRingXCarriesFilmsInAnEvent() {
assertEquals(listOf(401), SmartChannels.filter { it.channelFilms.isNotEmpty() }.map { it.number })
@Test fun onlyRingXAndAtlasCarryFilmsInAnEvent() {
// ATLAS (24 November 2026): its film events, from its own list.
assertEquals(listOf(ATLAS_NUMBER, 401), SmartChannels.filter { it.channelFilms.isNotEmpty() }.map { it.number }.sorted())
}
@Test fun ringXReadsItsEventsAgainWhenTheListChanges() {
@@ -22,7 +22,8 @@ class PresentationTest {
// Riot 3, After Dark 3, Horror, Gold, Three, Vortex 4 (Movie Night, Prime, Afterburn and its premiere), Orbit 2 2, Ring X 7 (six nights and PPV), Terra,
// and Saturday Mornings on Heroes, Orbit X and Rewind.
// OUTLAW's After Sundown joined on 23 November 2026; Frontline's Cost of War, Hitchcock Nights and Stories' After Hours on the 24th.
assertEquals(30, keys.size)
// ATLAS's five dayparts and four film events on the 25th.
assertEquals(39, keys.size)
assertEquals(emptySet<String>(), keys - BlockIdents.keys)
assertTrue(keys.all { PRESENTATION_KEY.matches(it) })
}
@@ -190,7 +190,7 @@ class WeightedRotationTest {
}
@Test fun theApprovedChannelsAreWeightedAndTotsBedtimeIsNot() {
assertEquals(listOf(101, 102, 103, 104, 106, 107, 108, 112, 202, 203, 204, 601, 602, 603, 604, 605, 614), SmartChannels.filter { it.tierWeights != null }.map { it.number }.sorted())
assertEquals(listOf(101, 102, 103, 104, 106, 107, 108, 112, ATLAS_NUMBER, 202, 203, 204, 601, 602, 603, 604, 605, 614), SmartChannels.filter { it.tierWeights != null }.map { it.number }.sorted())
// Riot, Terra, Ring X and Junior keep equal turns.
assertTrue(SmartChannels.filter { it.number in setOf(105, 201, 401, 611) }.all { it.tierWeights == null })
assertEquals(setOf(103, 202, 204, 601, 604, 605, 614), SmartChannels.filter { it.catalogueScaleHours != null }.map { it.number }.toSet())
+42
View File
@@ -0,0 +1,42 @@
# ATLAS (113)
Approved by Paul on 24 November 2026: international television and world cinema from every country, decade, budget and
genre, in the original language with English subtitles. Classics sit beside action, horror, science fiction, epics,
comedy and cult films. Anime stays on Sakura; Silver Screen keeps the golden age.
## Rules
- Original-language sound with full English subtitles; forced-only subtitles never count. Each title's original
language is recorded (AtlasPlayback.originals) and used only when the file has a sound track tagged in it; untagged
sound can't be verified and doesn't count.
- A series plays only up to its first episode that fails, or a gap in its numbering. It never skips an episode.
- The viewer's own sound or subtitle choice lasts for that programme on ATLAS and isn't saved for other channels.
- 21:00 watershed: nothing rated above TV-14 before 21:00 (series lists by block; The Masters at 14:00 holds no R-rated film).
- Shōgun and Dark are guests at the lowest weight (Signature stays their home). Who Killed Sara? lives here, not on Dark Files.
- Partly subtitled serials (Gomorrah, Fauda, My Brilliant Friend, Babylon Berlin…) play only their unbroken clear run, or
are held, until full subtitles exist.
## Blocks
| Time | Block | Key |
| --- | --- | --- |
| 06–12 | World Mornings | atlas.mornings |
| 12–17 | Grand Tour | atlas.grandtour |
| 17–21 | Case Files | atlas.casefiles |
| 21–00 | Prime Atlas | atlas.prime |
| 00–06 | Night Passage | atlas.nightpassage |
## Film events
| When | Event | Key |
| --- | --- | --- |
| Saturday 21:00, on time, one film | World Cinema Premiere | atlas.premiere |
| Sunday 14:00, on time, one film | The Masters | atlas.masters |
| First Friday of the month, 23:00, double bill | Asia Extreme | atlas.asiaextreme |
| First Sunday of the month, 21:00, two films | Passport | atlas.passport |
## Evidence
Audit, launch list and first week: the ATLAS doc (https://claude.ai/artifact/KC67wzCaxf7CwBoRBXoJki) and
~/Documents/OrbitTV/audit-20261124/atlas/. Playback test (24 November 2026, upstairs TV): tools/atlas-playtest.sh,
results in ~/Documents/OrbitTV/audits/atlas-playtest-20261124-*.
## Held at launch
Das Boot (2018), The Chestnut Man, 1983 and Tribes of Europa: their original sound isn't tagged on enough episodes.
Pather Panchali and Once Upon a Time in China: their sound is untagged. See the doc's Launch list for the rest.
+2 -2
View File
@@ -27,8 +27,8 @@ SLUGS = {101: "orbit-1", 102: "orbit-2", 103: "orbit-three", 104: "orbit-gold",
305: "orbit-after-dark", 306: "orbit-vhs", 307: "orbit-romance", 308: "orbit-detour", 309: "orbit-britx",
310: "orbit-christmas", 401: "orbit-ring-x", 601: "orbit-vortex", 602: "orbit-heroes", 603: "orbit-x",
604: "orbit-rewind", 605: "orbit-toonz", 611: "orbit-junior", 612: "orbit-wonder", 613: "orbit-pixelz", 614: "orbit-tots",
111: "orbit-americana", 311: "orbit-outlaw", 112: "orbit-stories", 312: "orbit-silver-screen", 313: "orbit-frontline"}
NAMED = {"AMERICANA_NUMBER": 111, "OUTLAW_NUMBER": 311, "STORIES_NUMBER": 112, "SILVER_SCREEN_NUMBER": 312, "FRONTLINE_NUMBER": 313, "TOTS_NUMBER": 614, "DRIVE_IN_NUMBER": 300, "VORTEX_NUMBER": 601, "CHRISTMAS_NUMBER": 310, "AFTER_DARK_NUMBER": 305}
111: "orbit-americana", 311: "orbit-outlaw", 112: "orbit-stories", 312: "orbit-silver-screen", 313: "orbit-frontline", 113: "orbit-atlas"}
NAMED = {"ATLAS_NUMBER": 113, "AMERICANA_NUMBER": 111, "OUTLAW_NUMBER": 311, "STORIES_NUMBER": 112, "SILVER_SCREEN_NUMBER": 312, "FRONTLINE_NUMBER": 313, "TOTS_NUMBER": 614, "DRIVE_IN_NUMBER": 300, "VORTEX_NUMBER": 601, "CHRISTMAS_NUMBER": 310, "AFTER_DARK_NUMBER": 305}
PACKS = {"orbit-mistletoe": "orbit-mistletoe", "orbit-sakura": "orbit-sakura"}
def run(*cmd): subprocess.run(cmd, check=True, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)