From 126611397db058716968eda7202b1ee3676d6905 Mon Sep 17 00:00:00 2001 From: Pauljd Date: Mon, 23 Nov 2026 16:51:26 +0000 Subject: [PATCH] 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 --- .../java/tv/orbit/classic/InstallSnapshot.kt | 19 ++++++++++- .../java/tv/orbit/classic/ApprovedTitles.kt | 34 +++++++++++++++++++ .../java/tv/orbit/classic/ChannelPresets.kt | 15 +++++--- .../java/tv/orbit/classic/ChannelSchedule.kt | 9 +++-- .../java/tv/orbit/classic/FilmIdentity.kt | 2 ++ .../tv/orbit/classic/ApprovedTitlesTest.kt | 16 +++++++++ .../tv/orbit/classic/IdentityChangesTest.kt | 12 +++++++ .../test/java/tv/orbit/classic/RefiledTest.kt | 4 +-- 8 files changed, 99 insertions(+), 12 deletions(-) diff --git a/android/app/src/household/java/tv/orbit/classic/InstallSnapshot.kt b/android/app/src/household/java/tv/orbit/classic/InstallSnapshot.kt index 9b5cc400..e9d64202 100644 --- a/android/app/src/household/java/tv/orbit/classic/InstallSnapshot.kt +++ b/android/app/src/household/java/tv/orbit/classic/InstallSnapshot.kt @@ -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") diff --git a/android/app/src/main/java/tv/orbit/classic/ApprovedTitles.kt b/android/app/src/main/java/tv/orbit/classic/ApprovedTitles.kt index 9e46ddf7..d588b256 100644 --- a/android/app/src/main/java/tv/orbit/classic/ApprovedTitles.kt +++ b/android/app/src/main/java/tv/orbit/classic/ApprovedTitles.kt @@ -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-