0.94.1: Ring X's pool signature includes its PPV events
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 2m12s
pauljd/davidson-ci: Davidson CI / ai-review (push) Failing after 1m33s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-11-03 16:17:11 +00:00
co-authored by Claude Opus 5.5
parent 6f3f1e5c19
commit 692bec6929
6 changed files with 20 additions and 5 deletions
+2 -2
View File
@@ -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 }
@@ -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. */
@@ -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)
@@ -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()) {
@@ -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"))
}
}
+6
View File
@@ -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.