From 692bec692986f909cbbd2c9aa2f8808a11579f42 Mon Sep 17 00:00:00 2001 From: Pauljd Date: Tue, 3 Nov 2026 16:17:11 +0000 Subject: [PATCH] 0.94.1: Ring X's pool signature includes its PPV events Co-Authored-By: Claude Opus 5.5 (1M context) --- android/app/build.gradle.kts | 4 ++-- .../app/src/main/java/tv/orbit/classic/ChannelSchedule.kt | 3 ++- android/app/src/main/java/tv/orbit/classic/EmbyClient.kt | 2 +- .../main/java/tv/orbit/classic/SecureMediaDataSource.kt | 2 +- .../app/src/test/java/tv/orbit/classic/PpvSundayTest.kt | 8 ++++++++ docs/VERIFICATION-0.94.0.md | 6 ++++++ 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index b511b740..951a4ed6 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -9,8 +9,8 @@ android { applicationId = "tv.orbit.classic" minSdk = 26 targetSdk = 36 - versionCode = 116 - versionName = "0.94.0-ppv-sunday" + versionCode = 117 + versionName = "0.94.1-ppv-sunday" } buildFeatures { compose = true } compileOptions { sourceCompatibility = JavaVersion.VERSION_17; targetCompatibility = JavaVersion.VERSION_17 } diff --git a/android/app/src/main/java/tv/orbit/classic/ChannelSchedule.kt b/android/app/src/main/java/tv/orbit/classic/ChannelSchedule.kt index a0e9e51f..575f9e31 100644 --- a/android/app/src/main/java/tv/orbit/classic/ChannelSchedule.kt +++ b/android/app/src/main/java/tv/orbit/classic/ChannelSchedule.kt @@ -36,7 +36,8 @@ internal data class ChannelProgramming(val number: Int, val name: String, val se /** Whether a show plays its episodes in a mixed order here. */ fun mixes(show: PoolSeries) = shuffleEpisodes || seriesKey(show.title) in shuffleTitles.mapTo(HashSet(), ::seriesKey) /** Changes when the list does, so the episode cache is read again. What's already committed stays. */ - val signature get() = "$CHANNEL_POOL_VERSION#${searches.joinToString("|")}#$seriesCount" + if (filmSeries.isEmpty()) "" else "#series:${filmSeries.joinToString("|")}" + if (channelFilms.isEmpty()) "" else "#films:${channelFilms.joinToString("|")}" + val signature get() = "$CHANNEL_POOL_VERSION#${searches.joinToString("|")}#$seriesCount" + + (if (filmSeries.isEmpty()) "" else "#series:${filmSeries.joinToString("|")}") + (if (channelFilms.isEmpty()) "" else "#films:${channelFilms.joinToString("|")}") } /** Expect the unexpected: standalone adventures by day in a mixed order, cult drama in order in prime time, and the strange stuff late. */ diff --git a/android/app/src/main/java/tv/orbit/classic/EmbyClient.kt b/android/app/src/main/java/tv/orbit/classic/EmbyClient.kt index 61f45cde..0d993a47 100644 --- a/android/app/src/main/java/tv/orbit/classic/EmbyClient.kt +++ b/android/app/src/main/java/tv/orbit/classic/EmbyClient.kt @@ -66,7 +66,7 @@ internal class HttpsEmbyTransport(internal val deviceId: String = UUID.randomUUI connection.connectTimeout = 10_000 connection.readTimeout = request.readTimeoutMs ?: if (request.path == "/Sessions/Logout") 5_000 else 15_000 connection.setRequestProperty("Accept", "application/json") - connection.setRequestProperty("X-Emby-Authorization", "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.94.0\"") + connection.setRequestProperty("X-Emby-Authorization", "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.94.1\"") request.token?.let { connection.setRequestProperty("X-Emby-Token", it) } if (request.method == "POST") { val bytes = request.body.orEmpty().toByteArray(Charsets.UTF_8) diff --git a/android/app/src/main/java/tv/orbit/classic/SecureMediaDataSource.kt b/android/app/src/main/java/tv/orbit/classic/SecureMediaDataSource.kt index caa2d088..62847c65 100644 --- a/android/app/src/main/java/tv/orbit/classic/SecureMediaDataSource.kt +++ b/android/app/src/main/java/tv/orbit/classic/SecureMediaDataSource.kt @@ -33,7 +33,7 @@ internal class SecureMediaDataSource(private val session: EmbySampleSession) : B next.instanceFollowRedirects = false next.connectTimeout = 10_000 next.readTimeout = 20_000 - next.setRequestProperty("User-Agent", "OrbitTV/0.94.0") + next.setRequestProperty("User-Agent", "OrbitTV/0.94.1") next.setRequestProperty("Accept-Encoding", "identity") session.mediaHeaders(address).forEach { (key, value) -> next.setRequestProperty(key, value) } if (dataSpec.position != 0L || dataSpec.length != C.LENGTH_UNSET.toLong()) { diff --git a/android/app/src/test/java/tv/orbit/classic/PpvSundayTest.kt b/android/app/src/test/java/tv/orbit/classic/PpvSundayTest.kt index 293c5eb4..6f91021f 100644 --- a/android/app/src/test/java/tv/orbit/classic/PpvSundayTest.kt +++ b/android/app/src/test/java/tv/orbit/classic/PpvSundayTest.kt @@ -87,4 +87,12 @@ class PpvSundayTest { @Test fun onlyRingXCarriesFilmsInAnEvent() { assertEquals(listOf(401), SmartChannels.filter { it.channelFilms.isNotEmpty() }.map { it.number }) } + + @Test fun ringXReadsItsEventsAgainWhenTheListChanges() { + // The pool's signature has to include the events, or the box keeps its old pool and never reads them. + assertTrue(ringX.signature.contains("#films:")) + assertTrue(ringX.signature.contains(PpvSunday.first())) + val afterDark = SmartChannels.first { it.number == AFTER_DARK_NUMBER } + assertTrue(afterDark.signature.endsWith("#series:$LAST_DRIVE_IN")) + } } diff --git a/docs/VERIFICATION-0.94.0.md b/docs/VERIFICATION-0.94.0.md index 62fb3f4e..b8a05f89 100644 --- a/docs/VERIFICATION-0.94.0.md +++ b/docs/VERIFICATION-0.94.0.md @@ -19,3 +19,9 @@ A separate, Ring X-only capability. No other channel changes. Remove PpvSunday from Ring X's channelFilms (and the event); Sunday evening returns to the vault. Nothing else depends on it. Not installed. + +## Installed, and a fault found (3 November 2026, about 16:15) +0.94.0 was installed with Paul's OK while the box was on its screensaver; Orbit opened to plan, then went back to the home screen. Booked plans unchanged. But Ring X didn't read its events: its pool signature left the event list out (an operator-precedence slip: the films part only joined the signature when a channel also carried a series). So the box kept Ring X's old pool and PPV Sunday is inactive. Nothing aired differently. + +## 0.94.1 +The signature fix, with a test that Ring X's signature includes its events and After Dark's is unchanged (so After Dark doesn't re-read). Nothing else differs. 359 tests pass, lint passes. Waiting for Paul's OK to install.