Approved previews: the Horror/After Dark split and Wonder/PixelZ
Horror keeps the mainstream and classic films; Evil Dead II, Army of Darkness, Braindead, Critters and Ghostwatch are After Dark's; Halloween and Scream leave After Dark's lists; Dawn of the Dead and The Texas Chain Saw Massacre stay on both. approve-withdraw removes approvals (accepted only, kept aside first) for the carried-over mainstream films. Wonder takes Frozen, Tangled, Moana, Zootopia, Big Hero 6, Wreck-It Ralph and Dinosaur, plus 12 Disney additions; PixelZ takes Coraline, Kubo, ParaNorman, Fantastic Mr. Fox and Corpse Bride, plus 28 additions, each by year and the server's IMDb ID. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,9 +26,11 @@ import java.security.MessageDigest
|
||||
* - `fix-booking` (23 November 2026): one booking replaced by hand, from install-restore/fix.json, with `confirm FIX` while
|
||||
* Orbit's screen isn't open. See [BookingFix]: nothing else in the plan moves.
|
||||
*
|
||||
* - `approve-withdraw` (23 November 2026): approvals withdrawn, from install-restore/withdraw.json, with `confirm WITHDRAW` while
|
||||
* Orbit's screen isn't open. See [ApprovedTitles.withdraw]: only the accepted list changes, kept aside first.
|
||||
* - `release-runtime` (23 November 2026): a film held for an odd running time, let through (`--es id`, `confirm RELEASE`).
|
||||
*
|
||||
* Apart from `restore`, `approve-add`, `fix-booking` and `release-runtime`, it only ever copies; it never changes the schedules, the library or the sign-in.
|
||||
* Apart from `restore`, `approve-add`, `approve-withdraw`, `fix-booking` and `release-runtime`, it only ever copies; it never changes the schedules, the library or the sign-in.
|
||||
*/
|
||||
class InstallSnapshotReceiver : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
@@ -72,6 +74,21 @@ class InstallSnapshotReceiver : BroadcastReceiver() {
|
||||
else ScheduleStore(target.scheduleDir).runtimeReleases().add(intent.getStringExtra("id").orEmpty())
|
||||
android.util.Log.i("OrbitInstall", "release-runtime: $resultData")
|
||||
return
|
||||
} else if (intent.getStringExtra("do") == "approve-withdraw") {
|
||||
// Approvals you've withdrawn ([ApprovedTitles.withdraw]): adb pushes install-restore/withdraw.json; it's read once and removed.
|
||||
val incoming = File(context.getExternalFilesDir(null), "install-restore/withdraw.json")
|
||||
try {
|
||||
val target = Workspaces.current(context)
|
||||
resultData = when {
|
||||
intent.getStringExtra("confirm") != "WITHDRAW" -> "refused: needs confirm WITHDRAW"
|
||||
OrbitScreen.open -> "refused: Orbit is open; force-stop it first"
|
||||
!incoming.exists() -> "refused: no withdraw.json"
|
||||
else -> ServerMove.userOf(target.scheduleDir)?.let { user ->
|
||||
ApprovedTitles.withdraw(target.scheduleDir, user, org.json.JSONArray(incoming.readText()), System.currentTimeMillis()) } ?: "refused: no saved schedules"
|
||||
}
|
||||
} catch (e: Exception) { resultData = "failed: ${e.javaClass.simpleName}" } finally { incoming.delete() }
|
||||
android.util.Log.i("OrbitInstall", "approve-withdraw: $resultData")
|
||||
return
|
||||
} else if (intent.getStringExtra("do") == "fix-booking") {
|
||||
// One booking replaced by hand ([BookingFix]): adb pushes install-restore/fix.json; it's read once and removed.
|
||||
val incoming = File(context.getExternalFilesDir(null), "install-restore/fix.json")
|
||||
|
||||
@@ -49,6 +49,40 @@ internal object ApprovedTitles {
|
||||
return "added $added:$report" + if (keep.exists()) " (kept ${keep.name})" else ""
|
||||
}
|
||||
|
||||
/**
|
||||
* Approvals you've withdrawn (Paul, 23 November 2026: the mainstream horror carried across to After Dark is Horror's). Each
|
||||
* entry names a channel and an item id, or a title and year for every copy of that work. Only the accepted list changes:
|
||||
* nothing is rejected, so the Chair may still suggest a title again, and nothing already booked moves. The channel's file
|
||||
* is kept as it was in withdrawn-<time>/ first, and any bad entry refuses the lot.
|
||||
*/
|
||||
fun withdraw(dir: File, userId: String, entries: JSONArray, nowMs: Long): String {
|
||||
val rows = (0 until entries.length()).map { entries.getJSONObject(it) }
|
||||
if (rows.isEmpty()) return "refused: nothing to withdraw"
|
||||
val wanted = rows.map { o ->
|
||||
val channel = o.optInt("c", -1).takeIf { it in 100..999 } ?: return "refused: a bad channel"
|
||||
val id = o.optString("i").takeIf { it.isNotEmpty() }?.let { i -> i.takeIf(EmbyClient::validId) ?: return "refused: a bad item id" }
|
||||
val title = o.optString("t").trim().take(160)
|
||||
if (id == null && title.isEmpty()) return "refused: an entry with no id or title"
|
||||
Triple(channel, id, if (title.isEmpty()) null else filmKey(title) + "|" + (if (o.isNull("y")) "" else o.optInt("y").toString()))
|
||||
}
|
||||
val store = ScheduleStore(dir)
|
||||
val keep = File(dir, "withdrawn-$nowMs")
|
||||
val report = StringBuilder()
|
||||
var gone = 0
|
||||
for ((channel, list) in wanted.groupBy { it.first }.toSortedMap()) {
|
||||
val before = store.loadChoices(userId, channel)
|
||||
fun work(s: Suggestion) = filmKey(s.title) + "|" + (s.year ?: "")
|
||||
val left = before.accepted.filterNot { s -> list.any { (_, id, w) -> s.id == id || work(s) == w } }
|
||||
val n = before.accepted.size - left.size
|
||||
report.append(" $channel-$n")
|
||||
if (n == 0) continue
|
||||
File(dir, "choices-$channel.json").takeIf { it.exists() }?.let { keep.mkdirs(); it.copyTo(File(keep, it.name), overwrite = true) }
|
||||
store.saveChoices(userId, channel, ChannelChoices(left, before.rejected))
|
||||
gone += n
|
||||
}
|
||||
return "withdrew $gone:$report" + if (keep.exists()) " (kept ${keep.name})" else ""
|
||||
}
|
||||
|
||||
/** Entries as [add] takes them, for tests and tools. */
|
||||
fun entry(channel: Int, id: String, title: String, year: Int?, type: String, ref: String = "", why: String = "") =
|
||||
JSONObject().put("c", channel).put("i", id).put("t", title).put("y", year ?: JSONObject.NULL).put("k", type).put("p", ref).put("r", why)
|
||||
|
||||
@@ -55,17 +55,24 @@ internal val ChannelPresets = listOf(
|
||||
ChannelPreset(108, "Orbit Play", PlayShows, smartOnly = true),
|
||||
ChannelPreset(612, "Wonder", listOf("Snow White and the Seven Dwarfs (1938)", "Pinocchio (1940)", "Dumbo (1941)", "Bambi", "Cinderella (1950)", "Alice in Wonderland (1951)", "Peter Pan (1953)", "Lady and the Tramp (1955)", "Sleeping Beauty (1959)", "One Hundred and One Dalmatians", "The Jungle Book (1967)", "The Aristocats", "Robin Hood (1973)",
|
||||
"The Fox and the Hound", "The Little Mermaid (1989)", "Beauty and the Beast (1991)", "Aladdin (1992)", "The Lion King (1994)", "Pocahontas (1995)", "The Hunchback of Notre Dame (1996)", "Hercules (1997)", "Mulan (1998)", "Tarzan (1999)", "The Emperor's New Groove", "Atlantis: The Lost Empire", "Lilo & Stitch (2002)", "Treasure Planet", "Brother Bear", "The Princess and the Frog",
|
||||
"An American Tail", "The Land Before Time", "All Dogs Go to Heaven", "Anastasia (1997)", "The Secret of NIMH", "Thumbelina (1994)", "The Iron Giant", "The Prince of Egypt", "Spirited Away", "My Neighbor Totoro", "Kiki's Delivery Service (1989)", "Howl's Moving Castle", "Ponyo", "Princess Mononoke", "Castle in the Sky", "Fantasia (1940)", "Oliver & Company", "The Rescuers", "The Rescuers Down Under", "The Great Mouse Detective", "The Black Cauldron", "The Many Adventures of Winnie the Pooh", "Winnie the Pooh (2011)", "Fantasia 2000", "Home on the Range (2004)", "The Road to El Dorado", "Spirit: Stallion of the Cimarron", "Sinbad: Legend of the Seven Seas", "The Swan Princess", "Balto", "We're Back! A Dinosaur's Story", "A Goofy Movie", "Quest for Camelot", "Rock-a-Doodle", "The Pagemaster", "FernGully: The Last Rainforest", "Watership Down", "The Last Unicorn", "Charlotte's Web (1973)", "Whisper of the Heart", "Porco Rosso", "Pom Poko", "The Cat Returns", "Nausicaä of the Valley of the Wind", "The Secret World of Arrietty", "Arrietty (2010)", "Song of the Sea", "The Secret of Kells", "Wolfwalkers", "Klaus", "The Nightmare Before Christmas", "Corpse Bride", "Coraline", "Kubo and the Two Strings", "ParaNorman", "Fantastic Mr. Fox", "The Wind Rises", "The Tale of Princess Kaguya", "The Tale of The Princess Kaguya", "From Up on Poppy Hill", "The Sword in the Stone", "The Hunchback of Notre Dame II", "An American Tail: Fievel Goes West", "The Land Before Time II: The Great Valley Adventure"), smartOnly = true, films = true),
|
||||
"An American Tail", "The Land Before Time", "All Dogs Go to Heaven", "Anastasia (1997)", "The Secret of NIMH", "Thumbelina (1994)", "The Iron Giant", "The Prince of Egypt", "Spirited Away", "My Neighbor Totoro", "Kiki's Delivery Service (1989)", "Howl's Moving Castle", "Ponyo", "Princess Mononoke", "Castle in the Sky", "Fantasia (1940)", "Oliver & Company", "The Rescuers", "The Rescuers Down Under", "The Great Mouse Detective", "The Black Cauldron", "The Many Adventures of Winnie the Pooh", "Winnie the Pooh (2011)", "Fantasia 2000", "Home on the Range (2004)", "The Road to El Dorado", "Spirit: Stallion of the Cimarron", "Sinbad: Legend of the Seven Seas", "The Swan Princess", "Balto", "We're Back! A Dinosaur's Story", "A Goofy Movie", "Quest for Camelot", "Rock-a-Doodle", "The Pagemaster", "FernGully: The Last Rainforest", "Watership Down", "The Last Unicorn", "Charlotte's Web (1973)", "Whisper of the Heart", "Porco Rosso", "Pom Poko", "The Cat Returns", "Nausicaä of the Valley of the Wind", "The Secret World of Arrietty", "Arrietty (2010)", "Song of the Sea", "The Secret of Kells", "Wolfwalkers", "Klaus", "The Nightmare Before Christmas", "The Wind Rises", "The Tale of Princess Kaguya", "The Tale of The Princess Kaguya", "From Up on Poppy Hill", "The Sword in the Stone", "The Hunchback of Notre Dame II", "An American Tail: Fievel Goes West", "The Land Before Time II: The Great Valley Adventure",
|
||||
// Paul, 23 November 2026: Wonder is the Disney-inspired family channel. Moved from PixelZ, and additions.
|
||||
"Frozen (2013)", "Tangled (2010)", "Moana (2016)", "Zootopia", "Big Hero 6", "Wreck-It Ralph", "Dinosaur (2000)",
|
||||
"Fun and Fancy Free (1947)", "Melody Time (1948)", "The Tigger Movie (2000)", "Piglet's Big Movie (2003)", "Strange World (2022)", "Wish (2023)", "Moana 2 (2024)", "Zootopia 2 (2025)", "Bedknobs and Broomsticks (1971)", "Pete's Dragon (1977)", "Disenchanted (2022)", "Mufasa: The Lion King (2024)"), smartOnly = true, films = true),
|
||||
ChannelPreset(613, "PixelZ", listOf("Toy Story", "Toy Story 2", "Toy Story 3", "Toy Story 4", "A Bug's Life", "Monsters, Inc.", "Monsters University", "Finding Nemo", "Finding Dory", "The Incredibles", "Incredibles 2", "Cars", "Cars 2", "Cars 3", "Ratatouille", "WALL·E", "Up (2009)", "Brave (2012)", "Inside Out (2015)", "Coco", "Luca", "Soul (2020)",
|
||||
"Shrek", "Shrek 2", "Shrek the Third", "Shrek Forever After", "Puss in Boots (2011)", "Madagascar", "Madagascar: Escape 2 Africa", "Kung Fu Panda", "Kung Fu Panda 2", "How to Train Your Dragon (2010)", "How to Train Your Dragon 2", "Megamind", "Antz", "Ice Age", "Ice Age: The Meltdown", "Despicable Me", "Despicable Me 2", "Minions", "The Lego Movie", "Tangled (2010)", "Frozen (2013)", "Moana (2016)", "Zootopia", "Big Hero 6", "Wreck-It Ralph", "Rio", "Robots (2005)", "Cloudy with a Chance of Meatballs", "Hotel Transylvania", "Hotel Transylvania 2", "Trolls", "Sing (2016)", "The Secret Life of Pets", "Despicable Me 3", "Monsters vs Aliens", "Meet the Robinsons", "Chicken Little", "Bolt (2008)", "The Croods", "Turbo (2013)", "Rise of the Guardians", "Epic (2013)", "Ice Age: Dawn of the Dinosaurs", "Ice Age: Continental Drift", "Happy Feet", "Over the Hedge", "Shark Tale", "Bee Movie", "Puss in Boots: The Last Wish", "Madagascar 3: Europe's Most Wanted", "Kung Fu Panda 3", "How to Train Your Dragon: The Hidden World", "Frozen II", "Encanto", "Raya and the Last Dragon", "Ralph Breaks the Internet", "Onward", "Elemental (2023)", "Lightyear", "Turning Red", "The Good Dinosaur", "The Wild Robot", "The LEGO Batman Movie", "The Lego Ninjago Movie", "Storks", "Ferdinand", "The Boss Baby", "The Smurfs (2011)", "Open Season (2006)", "Surf's Up", "Dinosaur (2000)", "The Polar Express", "Monster House", "Rango", "Spider-Man: Into the Spider-Verse", "Spider-Man: Across the Spider-Verse", "The Mitchells vs. the Machines", "Luck (2022)",
|
||||
"Shrek", "Shrek 2", "Shrek the Third", "Shrek Forever After", "Puss in Boots (2011)", "Madagascar", "Madagascar: Escape 2 Africa", "Kung Fu Panda", "Kung Fu Panda 2", "How to Train Your Dragon (2010)", "How to Train Your Dragon 2", "Megamind", "Antz", "Ice Age", "Ice Age: The Meltdown", "Despicable Me", "Despicable Me 2", "Minions", "The Lego Movie", "Rio", "Robots (2005)", "Cloudy with a Chance of Meatballs", "Hotel Transylvania", "Hotel Transylvania 2", "Trolls", "Sing (2016)", "The Secret Life of Pets", "Despicable Me 3", "Monsters vs Aliens", "Meet the Robinsons", "Chicken Little", "Bolt (2008)", "The Croods", "Turbo (2013)", "Rise of the Guardians", "Epic (2013)", "Ice Age: Dawn of the Dinosaurs", "Ice Age: Continental Drift", "Happy Feet", "Over the Hedge", "Shark Tale", "Bee Movie", "Puss in Boots: The Last Wish", "Madagascar 3: Europe's Most Wanted", "Kung Fu Panda 3", "How to Train Your Dragon: The Hidden World", "Frozen II", "Encanto", "Raya and the Last Dragon", "Ralph Breaks the Internet", "Onward", "Elemental (2023)", "Lightyear", "Turning Red", "The Good Dinosaur", "The Wild Robot", "The LEGO Batman Movie", "The Lego Ninjago Movie", "Storks", "Ferdinand", "The Boss Baby", "The Smurfs (2011)", "Open Season (2006)", "Surf's Up", "The Polar Express", "Monster House", "Rango", "Spider-Man: Into the Spider-Verse", "Spider-Man: Across the Spider-Verse", "The Mitchells vs. the Machines", "Luck (2022)",
|
||||
// Aardman, moved from Wonder: PixelZ is Pixar-style, DreamWorks, Aardman and stop-motion; Wonder is the Disney side (Paul, 23 November 2026).
|
||||
"Chicken Run", "Wallace & Gromit: The Curse of the Were-Rabbit", "Flushed Away"), smartOnly = true, films = true),
|
||||
"Chicken Run", "Wallace & Gromit: The Curse of the Were-Rabbit", "Flushed Away",
|
||||
// Paul, 23 November 2026: PixelZ is Pixar and the wider world of animated cinema. Moved from Wonder, and additions.
|
||||
"Coraline", "Kubo and the Two Strings", "ParaNorman", "Fantastic Mr. Fox", "Corpse Bride",
|
||||
"Inside Out 2 (2024)", "Elio (2025)", "Toy Story 5 (2026)", "Penguins of Madagascar (2014)", "Home (2015)", "Captain Underpants: The First Epic Movie (2017)", "Abominable (2019)", "The Croods: A New Age (2020)", "Trolls World Tour (2020)", "The Bad Guys (2022)", "The Bad Guys 2 (2025)", "Ruby Gillman: Teenage Kraken (2023)", "Kung Fu Panda 4 (2024)", "Orion and the Dark (2024)", "Dog Man (2025)", "Spirit Untamed (2021)", "The Boxtrolls (2014)", "Missing Link (2019)", "The Lorax (2012)", "Sing 2 (2021)", "Migration (2023)", "Vivo (2021)", "Wish Dragon (2021)", "Smurfs: The Lost Village (2017)", "Horton Hears a Who! (2008)", "Rio 2 (2014)", "The Peanuts Movie (2015)", "Ice Age: Collision Course (2016)"), smartOnly = true, films = true),
|
||||
ChannelPreset(306, "Orbit VHS", listOf("Back to the Future", "Back to the Future Part II", "Back to the Future Part III", "The Goonies", "Gremlins", "Gremlins 2: The New Batch", "Ghostbusters (1984)", "Ghostbusters II", "E.T. the Extra-Terrestrial", "Honey, I Shrunk the Kids", "Flight of the Navigator", "The NeverEnding Story", "Labyrinth (1986)", "Willow", "The Princess Bride", "Short Circuit", "Batteries Not Included", "Explorers", "Stand by Me (1986)", "The Karate Kid (1984)", "The Karate Kid Part II",
|
||||
"Ferris Bueller's Day Off", "The Breakfast Club", "Weird Science", "Teen Wolf", "Bill & Ted's Excellent Adventure", "Bill & Ted's Bogus Journey", "Wayne's World (1992)", "Big (1988)", "Home Alone", "Home Alone 2: Lost in New York", "Beetlejuice", "Hook (1991)", "Jumanji", "Mrs. Doubtfire", "Mac and Me", "Police Academy", "Top Gun", "Crocodile Dundee", "Who Framed Roger Rabbit", "Howard the Duck", "Masters of the Universe (1987)", "Innerspace", "Big Trouble in Little China", "Three Amigos", "Spaceballs", "Short Circuit 2", "Adventures in Babysitting (1987)", "Uncle Buck", "Planes, Trains and Automobiles", "National Lampoon's Vacation", "National Lampoon's European Vacation", "National Lampoon's Christmas Vacation", "Airplane! (1980)", "The Naked Gun: From the Files of Police Squad!", "The Naked Gun 2½: The Smell of Fear", "Hot Shots! (1991)", "Police Academy 2: Their First Assignment", "Trading Places", "Coming to America", "Beverly Hills Cop", "Beverly Hills Cop II", "48 Hrs.", "Twins", "Kindergarten Cop", "Honey, I Blew Up the Kid", "Dragnet (1987)", "Caddyshack", "Stripes", "Tootsie", "The Blues Brothers", "Sixteen Candles", "Pretty in Pink", "St. Elmo's Fire", "Say Anything...", "Heathers", "Better Off Dead (1985)", "Can't Buy Me Love", "Back to School", "Real Genius", "D.A.R.Y.L.", "The Last Starfighter", "Cocoon (1985)", "The Dark Crystal", "Time Bandits", "Legend (1985)", "Krull", "Conan the Barbarian (1982)", "Red Sonja (1985)", "Highlander", "Mannequin (1987)", "Harry and the Hendersons", "The Witches (1990)", "Hocus Pocus (1993)", "Jumanji", "The Mighty Ducks", "Cool Runnings"), smartOnly = true, films = true),
|
||||
ChannelPreset(303, "Orbit Sci-Fi", listOf("2001: A Space Odyssey", "Star Wars", "The Empire Strikes Back", "Return of the Jedi", "Alien (1979)", "Aliens (1986)", "Blade Runner", "The Terminator", "Terminator 2: Judgment Day", "RoboCop (1987)", "Total Recall (1990)", "Predator (1987)", "Stargate", "Starship Troopers", "The Fifth Element", "Contact (1997)", "Gattaca", "Dark City (1998)", "The Matrix", "Pitch Black (2000)", "Event Horizon", "Sunshine (2007)", "Moon (2009)", "District 9", "Inception", "Interstellar", "Gravity (2013)", "The Martian", "Arrival (2016)", "Ex Machina", "Dune (2021)", "Edge of Tomorrow", "Minority Report", "Looper", "Children of Men", "Star Trek II: The Wrath of Khan", "Star Trek: First Contact", "Star Trek", "Tron", "Close Encounters of the Third Kind", "The Abyss (1989)", "Independence Day (1996)", "Men in Black (1997)", "Serenity (2005)", "Planet of the Apes (1968)", "Soylent Green", "Logan's Run", "Primer", "Blade Runner 2049", "Dune: Part Two", "Alien 3", "Alien³ (1992)", "Alien Resurrection", "Prometheus (2012)", "Terminator 3: Rise of the Machines", "Terminator Salvation", "The Matrix Reloaded", "The Matrix Revolutions", "Twelve Monkeys", "Brazil (1985)", "A Clockwork Orange", "V for Vendetta", "Her", "Rogue One: A Star Wars Story", "Solo: A Star Wars Story", "Star Wars: Episode I - The Phantom Menace", "Star Wars: Episode II - Attack of the Clones", "Star Wars: Episode III - Revenge of the Sith", "Star Wars: The Force Awakens", "Star Wars: The Last Jedi", "Star Wars: The Rise of Skywalker", "Star Trek: The Motion Picture", "Star Trek III: The Search for Spock", "Star Trek IV: The Voyage Home", "Star Trek Into Darkness", "Star Trek Beyond", "Elysium", "Oblivion (2013)", "Source Code", "In Time", "I, Robot", "A.I. Artificial Intelligence", "War of the Worlds (2005)", "Predator 2", "RoboCop 2", "Deep Impact", "Annihilation", "Upgrade", "Tenet", "Ad Astra", "Passengers (2016)", "Lucy (2014)", "Limitless (2011)", "Galaxy Quest", "Flash Gordon (1980)", "Silent Running", "The Day the Earth Stood Still (1951)", "Forbidden Planet", "Westworld", "The Andromeda Strain", "Serenity (2005)"), smartOnly = true, films = true),
|
||||
// Paul, 23 November 2026: Evil Dead II, Army of Darkness, Braindead, Critters and Ghostwatch are After Dark's; Dawn of the Dead and The Texas Chain Saw Massacre stay on both.
|
||||
ChannelPreset(304, "Orbit Horror", listOf("A Nightmare on Elm Street (1984)",
|
||||
// Moved from After Dark (Paul, 4 November 2026).
|
||||
"Bram Stoker's Dracula (1992)", "Interview with the Vampire (1994)", "Red Dragon (2002)", "Sweeney Todd: The Demon Barber of Fleet Street (2007)", "The Devil's Advocate (1997)", "Friday the 13th (1980)", "The Texas Chain Saw Massacre", "Night of the Living Dead (1968)", "Dawn of the Dead (1978)", "The Exorcist", "The Omen (1976)", "The Shining", "Carrie (1976)", "Pet Sematary (1989)", "It (2017)", "Misery", "Child's Play (1988)", "Candyman (1992)", "Jaws", "The Blair Witch Project", "The Ring (2002)", "Saw (2004)", "Hostel (2006)", "The Descent (2005)", "Insidious", "The Conjuring", "Sinister", "Hereditary", "Midsommar", "The Witch (2016)", "It Follows", "Get Out (2017)", "A Quiet Place", "Rosemary's Baby", "Psycho (1960)", "The Birds", "Black Christmas (1974)", "Sleepaway Camp", "Maniac (1980)", "The Hills Have Eyes (1977)", "Critters", "Leprechaun", "Pumpkinhead", "Army of Darkness", "Evil Dead II", "Braindead", "The Mist", "Drag Me to Hell", "The Babadook", "Train to Busan", "Ringu", "Barbarian (2022)", "A Nightmare on Elm Street 3: Dream Warriors", "Friday the 13th Part 2", "Halloween II (1981)", "Scream 2", "Scream 3", "Sinister 2", "Insidious: Chapter 2", "The Conjuring 2", "Annabelle", "Annabelle: Creation", "The Nun (2018)", "It Chapter Two", "Saw II", "Saw III", "The Cabin in the Woods", "Cloverfield", "[REC] (2007)", "The Orphanage (2007)", "Let the Right One In", "Let Me In", "Paranormal Activity", "Paranormal Activity 2", "The Purge (2013)", "Us (2019)", "Nope", "Smile (2022)", "Talk to Me (2023)", "Final Destination (2000)", "Final Destination 2", "Final Destination 3", "Wrong Turn (2003)", "House of 1000 Corpses", "The Devil's Rejects", "Jeepers Creepers", "The Strangers (2008)", "You're Next", "Hush (2016)", "The Autopsy of Jane Doe", "Gerald's Game", "Doctor Sleep (2019)", "1408", "The Others (2001)", "The Sixth Sense", "Sleepy Hollow", "Pet Sematary Two", "Children of the Corn (1984)", "The Amityville Horror (1979)", "The Texas Chainsaw Massacre (2003)", "Hellbound: Hellraiser II", "Ghostwatch", "The Innocents (1961)", "The Haunting (1963)",
|
||||
"Bram Stoker's Dracula (1992)", "Interview with the Vampire (1994)", "Red Dragon (2002)", "Sweeney Todd: The Demon Barber of Fleet Street (2007)", "The Devil's Advocate (1997)", "Friday the 13th (1980)", "The Texas Chain Saw Massacre", "Night of the Living Dead (1968)", "Dawn of the Dead (1978)", "The Exorcist", "The Omen (1976)", "The Shining", "Carrie (1976)", "Pet Sematary (1989)", "It (2017)", "Misery", "Child's Play (1988)", "Candyman (1992)", "Jaws", "The Blair Witch Project", "The Ring (2002)", "Saw (2004)", "Hostel (2006)", "The Descent (2005)", "Insidious", "The Conjuring", "Sinister", "Hereditary", "Midsommar", "The Witch (2016)", "It Follows", "Get Out (2017)", "A Quiet Place", "Rosemary's Baby", "Psycho (1960)", "The Birds", "Black Christmas (1974)", "Sleepaway Camp", "Maniac (1980)", "The Hills Have Eyes (1977)", "Leprechaun", "Pumpkinhead", "The Mist", "Drag Me to Hell", "The Babadook", "Train to Busan", "Ringu", "Barbarian (2022)", "A Nightmare on Elm Street 3: Dream Warriors", "Friday the 13th Part 2", "Halloween II (1981)", "Scream 2", "Scream 3", "Sinister 2", "Insidious: Chapter 2", "The Conjuring 2", "Annabelle", "Annabelle: Creation", "The Nun (2018)", "It Chapter Two", "Saw II", "Saw III", "The Cabin in the Woods", "Cloverfield", "[REC] (2007)", "The Orphanage (2007)", "Let the Right One In", "Let Me In", "Paranormal Activity", "Paranormal Activity 2", "The Purge (2013)", "Us (2019)", "Nope", "Smile (2022)", "Talk to Me (2023)", "Final Destination (2000)", "Final Destination 2", "Final Destination 3", "Wrong Turn (2003)", "House of 1000 Corpses", "The Devil's Rejects", "Jeepers Creepers", "The Strangers (2008)", "You're Next", "Hush (2016)", "The Autopsy of Jane Doe", "Gerald's Game", "Doctor Sleep (2019)", "1408", "The Others (2001)", "The Sixth Sense", "Sleepy Hollow", "Pet Sematary Two", "Children of the Corn (1984)", "The Amityville Horror (1979)", "The Texas Chainsaw Massacre (2003)", "Hellbound: Hellraiser II", "The Innocents (1961)", "The Haunting (1963)",
|
||||
// Slasher Saturday.
|
||||
"Halloween (1978)", "Scream (1996)", "My Bloody Valentine (1981)", "Prom Night (1980)", "Terror Train (1980)", "The Burning (1981)", "Happy Birthday to Me",
|
||||
"April Fool's Day (1986)", "Silent Night, Deadly Night (1984)", "The Prowler (1981)", "Hell Night", "Hatchet", "I Know What You Did Last Summer (1997)",
|
||||
|
||||
@@ -188,10 +188,10 @@ internal val AfterDarkDaytimeCrossover get() = listOf("Attack of the Killer Toma
|
||||
"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. */
|
||||
// Halloween (1978) and Scream (1996) are Horror's (Paul, 23 November 2026).
|
||||
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)",
|
||||
"Basket Case", "Phantasm", "Repo Man", "Donnie Darko", "The Wicker Man (1973)", "Suspiria (1977)", "Eraserhead", "Blue Velvet", "From Dusk Till Dawn", "Scream (1996)",
|
||||
"Poltergeist (1982)", "The Howling (1981)", "Creepshow", "Prince of Darkness",
|
||||
"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)",
|
||||
"Basket Case", "Phantasm", "Repo Man", "Donnie Darko", "The Wicker Man (1973)", "Suspiria (1977)", "Eraserhead", "Blue Velvet", "From Dusk Till Dawn", "Poltergeist (1982)", "The Howling (1981)", "Creepshow", "Prince of Darkness",
|
||||
// B-Movie Throwbacks and Cult Classics.
|
||||
"The Toxic Avenger (1984)", "Night of the Creeps", "Plan 9 from Outer Space", "Attack of the Killer Tomatoes! (1978)", "Killer Klowns from Outer Space", "C.H.U.D.",
|
||||
"The Stuff (1985)", "The Return of the Living Dead", "Street Trash (1987)", "Brain Damage", "Frankenhooker", "Chopping Mall", "Night of the Comet",
|
||||
@@ -211,8 +211,7 @@ internal val SmartChannels: List<ChannelProgramming> get() = BuiltInChannels + C
|
||||
private val BuiltInChannels = listOf(
|
||||
ChannelProgramming(AFTER_DARK_NUMBER, "After Dark", AfterDarkFilms, seriesCount = AfterDarkFilms.size, filmSeries = listOf(LAST_DRIVE_IN) + AfterDarkAnthologies, filmRestMs = 7 * 24 * 60 * 60_000L, adaptiveFilmRest = true,
|
||||
withdrawnOnOriginal = AfterDarkWithdrawn,
|
||||
dayParts = AfterDarkEvents + AfterDarkStrand + 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",
|
||||
dayParts = AfterDarkEvents + AfterDarkStrand + 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)", "Escape from New York", "They Live", "Repo Man", "Donnie Darko", "From Dusk Till Dawn", "Creepshow", "Near Dark", "The Fog (1980)", "Blue Velvet",
|
||||
"The Wicker Man (1973)", "An American Werewolf in London", "Prince of Darkness") + AfterDarkDaytimeCrossover + AfterDarkDaytimeAdditions, group = "day")),
|
||||
suggestionRules = listOf(
|
||||
SuggestionRule("day", "Daytime", "Movie", listOf("Horror", "Comedy"), 1975..2010, 6f, setOf("NC-17", "X"), 40, NotCultCinema, 70),
|
||||
|
||||
@@ -105,6 +105,8 @@ internal fun filmCandidate(row: JSONObject): FilmCandidate? {
|
||||
* Where two films share a title and a year, this is what tells them apart.
|
||||
*/
|
||||
internal val FilmImdb: Map<String, String> = mapOf(
|
||||
// Paul, 23 November 2026: Wonder and PixelZ additions, by the server's own IMDb IDs.
|
||||
"Inside Out 2 (2024)" to "tt22022452", "Elio (2025)" to "tt4900148", "Toy Story 5 (2026)" to "tt29355505", "Penguins of Madagascar (2014)" to "tt1911658", "Home (2015)" to "tt2224026", "Captain Underpants: The First Epic Movie (2017)" to "tt2091256", "Abominable (2019)" to "tt6324278", "The Croods: A New Age (2020)" to "tt2850386", "Trolls World Tour (2020)" to "tt6587640", "The Bad Guys (2022)" to "tt8115900", "The Bad Guys 2 (2025)" to "tt30017619", "Ruby Gillman: Teenage Kraken (2023)" to "tt27155038", "Kung Fu Panda 4 (2024)" to "tt21692408", "Orion and the Dark (2024)" to "tt28066777", "Dog Man (2025)" to "tt10954718", "Spirit Untamed (2021)" to "tt11084896", "The Boxtrolls (2014)" to "tt0787474", "Missing Link (2019)" to "tt6348138", "The Lorax (2012)" to "tt1482459", "Sing 2 (2021)" to "tt6467266", "Migration (2023)" to "tt6495056", "Vivo (2021)" to "tt6338498", "Wish Dragon (2021)" to "tt5562070", "Smurfs: The Lost Village (2017)" to "tt2398241", "Horton Hears a Who! (2008)" to "tt0451079", "Rio 2 (2014)" to "tt2357291", "The Peanuts Movie (2015)" to "tt2452042", "Ice Age: Collision Course (2016)" to "tt3416828", "Fun and Fancy Free (1947)" to "tt0039404", "Melody Time (1948)" to "tt0040580", "The Tigger Movie (2000)" to "tt0220099", "Piglet's Big Movie (2003)" to "tt0323642", "Strange World (2022)" to "tt10298840", "Wish (2023)" to "tt11304740", "Moana 2 (2024)" to "tt13622970", "Zootopia 2 (2025)" to "tt26443597", "Bedknobs and Broomsticks (1971)" to "tt0066817", "Pete's Dragon (1977)" to "tt0076538", "Disenchanted (2022)" to "tt1596342", "Mufasa: The Lion King (2024)" to "tt13186482",
|
||||
// Paul, 23 November 2026: names the library shares with another film, settled by the server's own IMDb IDs.
|
||||
"Aliens (1986)" to "tt0090605", "Independence Day (1996)" to "tt0116629", "Prometheus (2012)" to "tt1446714", "Armageddon (1998)" to "tt0120591", "Logan (2017)" to "tt3315342", "The Expendables (2010)" to "tt1320253", "The Toxic Avenger (1984)" to "tt0090190", "Stand by Me (1986)" to "tt0092005", "Dear John (2010)" to "tt0989757", "Road Trip (2000)" to "tt0215129", "The Bank Job (2008)" to "tt0200465", "How the Grinch Stole Christmas (2000)" to "tt0170016", "The Snowman (1982)" to "tt0084701", "White Christmas (1954)" to "tt0047673", "Let It Snow (2019)" to "tt1950235", "Holiday Affair (1949)" to "tt0041473", "Deck the Halls (2006)" to "tt0790604", "Soul (2020)" to "tt2948372", "Epic (2013)" to "tt0848537", "Dinosaur (2000)" to "tt0130623",
|
||||
"'Til Death Do Us Part (2017)" to "tt6848602", "A Nightmare on Elm Street (1984)" to "tt0087800", "About Time (2013)" to "tt2194499", "Accepted (2006)" to "tt0384793",
|
||||
|
||||
@@ -41,4 +41,20 @@ class ApprovedTitlesTest {
|
||||
assertTrue(ApprovedTitles.add(dir, user, list, 1L).startsWith("refused"))
|
||||
assertTrue(ScheduleStore(dir).loadChoices(user, 205).accepted.isEmpty())
|
||||
}
|
||||
|
||||
@Test fun withdrawnApprovalsLeaveOnlyTheAcceptedListKeptAsideFirst() {
|
||||
val dir = tmp.newFolder("schedule")
|
||||
val store = ScheduleStore(dir)
|
||||
val jaws = Suggestion("5001", "Jaws", 1975, "Movie", "", "Moved"); val jaws2 = Suggestion("5002", "Jaws", 1975, "Movie", "", "Another copy")
|
||||
val evil = Suggestion("5003", "Evil Dead II", 1987, "Movie", "", "Moved")
|
||||
store.saveChoices(user, 305, ChannelChoices(listOf(jaws, jaws2, evil), setOf("7777")))
|
||||
val list = JSONArray(listOf(org.json.JSONObject().put("c", 305).put("t", "Jaws").put("y", 1975)))
|
||||
assertEquals("withdrew 2: 305-2 (kept withdrawn-1000)", ApprovedTitles.withdraw(dir, user, list, 1_000L))
|
||||
val left = store.loadChoices(user, 305)
|
||||
assertEquals(listOf("5003"), left.accepted.map { it.id })
|
||||
assertEquals(setOf("7777"), left.rejected) // nothing rejected by a withdrawal
|
||||
assertTrue(java.io.File(dir, "withdrawn-1000/choices-305.json").exists())
|
||||
assertEquals("withdrew 0: 305-0", ApprovedTitles.withdraw(dir, user, list, 2_000L))
|
||||
assertTrue(ApprovedTitles.withdraw(dir, user, JSONArray(listOf(org.json.JSONObject().put("c", 305).put("i", "../x"))), 3_000L).startsWith("refused"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,4 +38,16 @@ class IdentityChangesTest {
|
||||
assertEquals(TIER_CORE, PlayTiers[seriesKey("The 1% Club")])
|
||||
assertEquals(null, PlayTiers[seriesKey("The Crystal Maze")]) // supporting, the default
|
||||
}
|
||||
|
||||
@Test fun wonderAndPixelzAndTheHorrorSplit() {
|
||||
fun list(n: Int) = ChannelPresets.first { it.number == n }.searches
|
||||
listOf("Coraline", "Kubo and the Two Strings", "ParaNorman", "Fantastic Mr. Fox", "Corpse Bride", "Inside Out 2 (2024)", "The Boxtrolls (2014)").forEach { assertTrue(it in list(613)); assertFalse(it in list(612)) }
|
||||
listOf("Frozen (2013)", "Tangled (2010)", "Moana (2016)", "Zootopia", "Big Hero 6", "Wreck-It Ralph", "Dinosaur (2000)", "Moana 2 (2024)").forEach { assertTrue(it in list(612)); assertFalse(it in list(613)) }
|
||||
assertTrue("The Nightmare Before Christmas" in list(612))
|
||||
val afterDark = SmartChannels.first { it.number == AFTER_DARK_NUMBER }.let { p -> p.searches + p.dayParts.flatMap { it.titles } }
|
||||
listOf("Evil Dead II", "Army of Darkness", "Braindead", "Critters", "Ghostwatch").forEach { assertFalse(it in list(304)) }
|
||||
listOf("Halloween (1978)", "Scream (1996)").forEach { assertTrue(it in list(304)); assertFalse(it in afterDark) }
|
||||
listOf("Dawn of the Dead (1978)", "The Texas Chain Saw Massacre").forEach { assertTrue(it in list(304)) }
|
||||
assertEquals("tt2224026", FilmIdentity.of("Home (2015)").imdb)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,9 +48,9 @@ class RefiledTest {
|
||||
}
|
||||
val booked = SampleItem("Halloween", "Movie", 91, "", "old1978", 91 * 60_000L)
|
||||
val session = EmbySampleSession(transport, "fixture-token-private", "fixture-user", EmbySample(listOf(booked), 1))
|
||||
assertEquals("Halloween (1978)", listedFilmEntry(AFTER_DARK_NUMBER, "Halloween"))
|
||||
assertEquals("Halloween (1978)", listedFilmEntry(304, "Halloween"))
|
||||
assertNull(session.refiledFilm(booked))
|
||||
assertEquals("h1978", session.refiledFilm(booked, AFTER_DARK_NUMBER)!!.item.id)
|
||||
assertEquals("h1978", session.refiledFilm(booked, 304)!!.item.id)
|
||||
}
|
||||
|
||||
@Test fun nothingWhenTheEpisodeIsntThere() {
|
||||
|
||||
Reference in New Issue
Block a user