Saturday Mornings ident (0.108.69)
Approved by Paul on 6 November 2026: a 4-second block ident as the weekend cartoons begin on Heroes, Orbit X and Rewind (design/channels/ build-saturday-mornings.py, EffectCraft), with a synthesised sting; Sundays read SUNDAY MORNINGS. The key names the ident only; booking is unchanged. Also lets the adb-only install check copy the library catalogue out (read-only) to check new channels' titles. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,8 +9,8 @@ android {
|
||||
applicationId = "tv.orbit.classic"
|
||||
minSdk = 26
|
||||
targetSdk = 36
|
||||
versionCode = 228
|
||||
versionName = "0.108.68-slower-chase"
|
||||
versionCode = 229
|
||||
versionName = "0.108.69-saturday-mornings"
|
||||
}
|
||||
buildFeatures { compose = true }
|
||||
// The finished build for the TVs (Paul, 6 November 2026: the test build stuttered on the box). Not debuggable, so
|
||||
|
||||
@@ -52,8 +52,13 @@ internal val BlockIdents: Map<String, BlockIdent> = mapOf(
|
||||
"orbit2.spooky" to BlockIdent(R.raw.block_orbit2_spooky, R.raw.block_orbit2_spooky_sting),
|
||||
"ringx.ppv" to BlockIdent(R.raw.block_ringx_ppv, R.raw.block_ringx_ppv_sting, BlockOverlay.TonightsEvent),
|
||||
"terra.sunday" to BlockIdent(R.raw.block_terra_sunday, R.raw.block_terra_sunday_sting),
|
||||
// Saturday Mornings (Paul, 6 November 2026): the weekend cartoons on Heroes, Orbit X and Rewind; Sundays read SUNDAY.
|
||||
SATURDAY_MORNINGS to BlockIdent(R.raw.block_saturday_mornings, R.raw.block_saturday_mornings_sting),
|
||||
) + RingXNights.keys.associateWith { BlockIdent(R.raw.block_ringx_nights, R.raw.block_ringx_nights_sting, BlockOverlay.RingXNight) }
|
||||
|
||||
internal const val SATURDAY_MORNINGS = "saturday.mornings"
|
||||
private val SundayMornings = BlockIdent(R.raw.block_sunday_mornings, R.raw.block_saturday_mornings_sting)
|
||||
|
||||
/** Orbit's own names for Ring X's weekly nights (approved 3 November 2026), and each night's rope colour. */
|
||||
internal val RingXNights: Map<String, Pair<String, Long>> get() = mapOf(
|
||||
"ringx.monday" to ("MONDAY NIGHT WARS" to 0xFFE81C30), "ringx.tuesday" to ("TUESDAY TITLE FIGHT" to 0xFFFFC21E),
|
||||
@@ -65,7 +70,9 @@ internal val RingXNights: Map<String, Pair<String, Long>> get() = mapOf(
|
||||
* anything else, including the second programme inside the same block, gets the channel's ident (null).
|
||||
*/
|
||||
internal fun blockIdentFor(current: SampleBroadcast, next: SampleBroadcast, enabled: Boolean): BlockIdent? =
|
||||
if (!enabled || next.presentation.isEmpty() || next.presentation == current.presentation) null else BlockIdents[next.presentation]
|
||||
if (!enabled || next.presentation.isEmpty() || next.presentation == current.presentation) null
|
||||
else if (next.presentation == SATURDAY_MORNINGS && java.time.Instant.ofEpochMilli(next.startMs).atZone(java.time.ZoneId.systemDefault()).dayOfWeek == java.time.DayOfWeek.SUNDAY) SundayMornings
|
||||
else BlockIdents[next.presentation]
|
||||
|
||||
/** A programme title made fit for a lower third: the guide's own clean title, or nothing if there isn't one. */
|
||||
internal fun eventTitle(next: SampleBroadcast): String? = guideTitleParts(next.media.item.title).first.trim().takeIf { it.isNotEmpty() }
|
||||
|
||||
@@ -182,8 +182,9 @@ private val HeroesMarvel = listOf("X-Men: The Animated Series", "Spider-Man: The
|
||||
private val HeroesAfterSchool = listOf("Batman: The Animated Series", "Superman: The Animated Series", "Batman Beyond", "Justice League", "Justice League Unlimited", "Static Shock", "Teen Titans")
|
||||
internal val HeroesShows get() = (HeroesCore + HeroesSupporting).distinct()
|
||||
internal val HeroesDayParts get() = listOf(
|
||||
DayPart(7, 11, HeroesMarvel, days = setOf(DayOfWeek.SATURDAY)),
|
||||
DayPart(7, 11, HeroesSaturday, days = setOf(DayOfWeek.SUNDAY)),
|
||||
// Saturday Mornings' ident as the weekend cartoons begin (Paul, 6 November 2026); the key names the ident only.
|
||||
DayPart(7, 11, HeroesMarvel, days = setOf(DayOfWeek.SATURDAY), key = SATURDAY_MORNINGS),
|
||||
DayPart(7, 11, HeroesSaturday, days = setOf(DayOfWeek.SUNDAY), key = SATURDAY_MORNINGS),
|
||||
DayPart(6, 15, HeroesShows), DayPart(15, 18, HeroesAfterSchool), DayPart(18, 22, HeroesCore + listOf("Young Justice", "The Avengers: Earth's Mightiest Heroes", "The Spectacular Spider-Man")),
|
||||
DayPart(22, 6, HeroesShows))
|
||||
/** Self-contained episodes mix. Shows with story arcs stay in order. */
|
||||
@@ -201,8 +202,8 @@ private val OrbitXGuests = listOf("X-Men: The Animated Series", "Spider-Man: The
|
||||
private val OrbitXEarlierNames = listOf("Digimon Adventure", "Mighty Morphin Power Rangers", "G.I. Joe: A Real American Hero")
|
||||
internal val OrbitXShows get() = (OrbitXCore + OrbitXSupporting + OrbitXGuests + OrbitXEarlierNames).distinct()
|
||||
internal val OrbitXDayParts get() = listOf(
|
||||
DayPart(7, 12, OrbitXCore + OrbitXEarlierNames + OrbitXGuests, days = setOf(DayOfWeek.SATURDAY)),
|
||||
DayPart(7, 12, OrbitXSaturday, days = setOf(DayOfWeek.SUNDAY)),
|
||||
DayPart(7, 12, OrbitXCore + OrbitXEarlierNames + OrbitXGuests, days = setOf(DayOfWeek.SATURDAY), key = SATURDAY_MORNINGS),
|
||||
DayPart(7, 12, OrbitXSaturday, days = setOf(DayOfWeek.SUNDAY), key = SATURDAY_MORNINGS),
|
||||
DayPart(15, 18, OrbitXCore + OrbitXEarlierNames + OrbitXGuests, days = Weekdays),
|
||||
DayPart(6, 18, OrbitXCore + OrbitXSupporting + OrbitXEarlierNames), DayPart(18, 23, OrbitXShows), DayPart(23, 6, OrbitXCore + OrbitXSupporting + OrbitXEarlierNames))
|
||||
internal val OrbitXMixed get() = setOf("Biker Mice from Mars", "Teenage Mutant Ninja Turtles", "The Transformers", "He-Man and the Masters of the Universe", "ThunderCats",
|
||||
@@ -220,7 +221,7 @@ private val RewindSupporting = listOf("Rugrats", "Hey Arnold!", "Doug", "CatDog"
|
||||
private val RewindNewer = listOf("Regular Show", "Gravity Falls")
|
||||
internal val RewindShows get() = (RewindCore + RewindSupporting + RewindNewer).distinct()
|
||||
internal val RewindDayParts get() = listOf(
|
||||
DayPart(7, 12, RewindSaturday, days = Weekend),
|
||||
DayPart(7, 12, RewindSaturday, days = Weekend, key = SATURDAY_MORNINGS),
|
||||
DayPart(6, 9, RewindCore + listOf("Rugrats", "Hey Arnold!", "Doug")), DayPart(9, 15, RewindShows),
|
||||
DayPart(15, 19, RewindCore), DayPart(19, 23, RewindShows), DayPart(23, 6, RewindCore))
|
||||
internal val RewindMixed get() = RewindShows.toSet() - "Gravity Falls"
|
||||
|
||||
@@ -62,9 +62,9 @@ internal class HttpsEmbyTransport(internal val deviceId: String = UUID.randomUUI
|
||||
}
|
||||
/** The sign-in headers for this kind of server. */
|
||||
internal fun authHeaders(token: String?): Map<String, String> = when (kind) {
|
||||
ServerKind.Emby -> mapOf("X-Emby-Authorization" to "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.108.68\"") +
|
||||
ServerKind.Emby -> mapOf("X-Emby-Authorization" to "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.108.69\"") +
|
||||
(token?.let { mapOf("X-Emby-Token" to it) } ?: emptyMap())
|
||||
ServerKind.Jellyfin -> mapOf("Authorization" to "MediaBrowser Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.108.68\"" +
|
||||
ServerKind.Jellyfin -> mapOf("Authorization" to "MediaBrowser Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.108.69\"" +
|
||||
(token?.let { ", Token=\"$it\"" } ?: ""))
|
||||
}
|
||||
/** One picture from the provider, or nothing. Same fixed origin and no redirects, and failures are never shown or logged. */
|
||||
|
||||
@@ -13,6 +13,7 @@ import java.security.MessageDigest
|
||||
* - `snapshot`: copies the schedules and settings into Orbit's own folder on shared storage, with the library's and
|
||||
* sign-in's checksums, for adb to pull and compare. Nothing is read out of them here.
|
||||
* - `rollback <version>`: copies the schedules aside as schedule-rollback-<version>, as every install does.
|
||||
* - `catalogue`: a read-only copy of the library catalogue beside it, for checking new channels' titles against the library.
|
||||
* - `clear`: removes the copy once it's been pulled.
|
||||
*
|
||||
* It only ever copies; it never changes the schedules, the library or the sign-in.
|
||||
@@ -48,6 +49,12 @@ internal object InstallSnapshot {
|
||||
aside.deleteRecursively(); schedule.copyRecursively(aside, overwrite = true)
|
||||
"aside ${aside.walk().count { it.isFile }}"
|
||||
}
|
||||
"catalogue" -> {
|
||||
val db = File(data, "no_backup/catalogue.db")
|
||||
if (!db.exists()) return "no catalogue"
|
||||
db.copyTo(File(out, "catalogue.db"), overwrite = true)
|
||||
"copied catalogue"
|
||||
}
|
||||
"clear" -> { out.deleteRecursively(); "cleared" }
|
||||
else -> "unknown"
|
||||
}
|
||||
|
||||
@@ -39,7 +39,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.108.68")
|
||||
next.setRequestProperty("User-Agent", "OrbitTV/0.108.69")
|
||||
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()) {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -19,8 +19,9 @@ class PresentationTest {
|
||||
@Test fun everyApprovedBlockKeyHasItsIdent() {
|
||||
// Takeovers (6 November 2026) have their own drawn ident instead of a filmed one.
|
||||
val keys = SmartChannels.flatMap { it.dayParts }.map { it.key }.filter { it.isNotEmpty() }.toSet() - Takeovers.map { it.key }.toSet()
|
||||
// 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.
|
||||
assertEquals(23, keys.size)
|
||||
// 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, shared by Heroes, Orbit X and Rewind.
|
||||
assertEquals(24, keys.size)
|
||||
assertEquals(emptySet<String>(), keys - BlockIdents.keys)
|
||||
assertTrue(keys.all { PRESENTATION_KEY.matches(it) })
|
||||
}
|
||||
@@ -115,4 +116,12 @@ class PresentationTest {
|
||||
val long = "NJPW Dominion 6.9 in Osaka-jo Hall and a very long subtitle that runs on"
|
||||
assertEquals(long, eventTitle(broadcast("ringx.ppv", long)))
|
||||
}
|
||||
|
||||
@Test fun saturdayMorningsReadsSundayOnSundays() {
|
||||
val sunday = java.time.LocalDate.of(2026, 11, 8).atTime(7, 0).atZone(java.time.ZoneId.systemDefault()).toInstant().toEpochMilli()
|
||||
val saturday = sunday - 24 * 60 * 60_000L
|
||||
fun at(ms: Long, key: String) = SampleBroadcast(ScheduledMedia(SampleItem("Show / S1 E1 / One", "Episode", 30, "", "i", 30 * 60_000L), "c", 30 * 60_000L), ms, key)
|
||||
assertEquals(R.raw.block_saturday_mornings, blockIdentFor(at(saturday - 1, ""), at(saturday, SATURDAY_MORNINGS), true)?.video)
|
||||
assertEquals(R.raw.block_sunday_mornings, blockIdentFor(at(sunday - 1, ""), at(sunday, SATURDAY_MORNINGS), true)?.video)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user