Saturday Mornings in each channel's colours (0.108.70)
Paul, 6 November 2026: Heroes, Orbit X and Rewind each get their own Saturday and Sunday Mornings, the same sun over the hill in the channel's colours with its logo, and no cast. One key per channel names the ident only. 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 = 229
|
||||
versionName = "0.108.69-saturday-mornings"
|
||||
versionCode = 230
|
||||
versionName = "0.108.70-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,12 +52,18 @@ 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),
|
||||
// Saturday Mornings (Paul, 6 November 2026): the weekend cartoons on Heroes, Orbit X and Rewind, each in its own
|
||||
// colours with its logo; Sundays read SUNDAY.
|
||||
"saturday.heroes" to BlockIdent(R.raw.block_saturday_heroes, R.raw.block_saturday_mornings_sting),
|
||||
"saturday.orbitx" to BlockIdent(R.raw.block_saturday_orbitx, R.raw.block_saturday_mornings_sting),
|
||||
"saturday.rewind" to BlockIdent(R.raw.block_saturday_rewind, 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)
|
||||
/** Each channel's Sunday Mornings, for its Saturday Mornings key on a Sunday. */
|
||||
private val SundayMornings = mapOf(
|
||||
"saturday.heroes" to BlockIdent(R.raw.block_sunday_heroes, R.raw.block_saturday_mornings_sting),
|
||||
"saturday.orbitx" to BlockIdent(R.raw.block_sunday_orbitx, R.raw.block_saturday_mornings_sting),
|
||||
"saturday.rewind" to BlockIdent(R.raw.block_sunday_rewind, 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(
|
||||
@@ -71,7 +77,7 @@ internal val RingXNights: Map<String, Pair<String, Long>> get() = mapOf(
|
||||
*/
|
||||
internal fun blockIdentFor(current: SampleBroadcast, next: SampleBroadcast, enabled: Boolean): BlockIdent? =
|
||||
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 if (next.presentation in SundayMornings && java.time.Instant.ofEpochMilli(next.startMs).atZone(java.time.ZoneId.systemDefault()).dayOfWeek == java.time.DayOfWeek.SUNDAY) SundayMornings[next.presentation]
|
||||
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. */
|
||||
|
||||
@@ -182,9 +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(
|
||||
// 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),
|
||||
// Saturday Mornings' ident as the weekend cartoons begin, in each channel's colours (Paul, 6 November 2026); the key names the ident only.
|
||||
DayPart(7, 11, HeroesMarvel, days = setOf(DayOfWeek.SATURDAY), key = "saturday.heroes"),
|
||||
DayPart(7, 11, HeroesSaturday, days = setOf(DayOfWeek.SUNDAY), key = "saturday.heroes"),
|
||||
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. */
|
||||
@@ -202,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), key = SATURDAY_MORNINGS),
|
||||
DayPart(7, 12, OrbitXSaturday, days = setOf(DayOfWeek.SUNDAY), key = SATURDAY_MORNINGS),
|
||||
DayPart(7, 12, OrbitXCore + OrbitXEarlierNames + OrbitXGuests, days = setOf(DayOfWeek.SATURDAY), key = "saturday.orbitx"),
|
||||
DayPart(7, 12, OrbitXSaturday, days = setOf(DayOfWeek.SUNDAY), key = "saturday.orbitx"),
|
||||
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",
|
||||
@@ -221,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, key = SATURDAY_MORNINGS),
|
||||
DayPart(7, 12, RewindSaturday, days = Weekend, key = "saturday.rewind"),
|
||||
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.69\"") +
|
||||
ServerKind.Emby -> mapOf("X-Emby-Authorization" to "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.108.70\"") +
|
||||
(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.69\"" +
|
||||
ServerKind.Jellyfin -> mapOf("Authorization" to "MediaBrowser Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.108.70\"" +
|
||||
(token?.let { ", Token=\"$it\"" } ?: ""))
|
||||
}
|
||||
/** One picture from the provider, or nothing. Same fixed origin and no redirects, and failures are never shown or logged. */
|
||||
|
||||
@@ -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.69")
|
||||
next.setRequestProperty("User-Agent", "OrbitTV/0.108.70")
|
||||
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -20,8 +20,8 @@ class PresentationTest {
|
||||
// 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,
|
||||
// and Saturday Mornings, shared by Heroes, Orbit X and Rewind.
|
||||
assertEquals(24, keys.size)
|
||||
// and Saturday Mornings on Heroes, Orbit X and Rewind.
|
||||
assertEquals(26, keys.size)
|
||||
assertEquals(emptySet<String>(), keys - BlockIdents.keys)
|
||||
assertTrue(keys.all { PRESENTATION_KEY.matches(it) })
|
||||
}
|
||||
@@ -121,7 +121,7 @@ class PresentationTest {
|
||||
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)
|
||||
assertEquals(R.raw.block_saturday_rewind, blockIdentFor(at(saturday - 1, ""), at(saturday, "saturday.rewind"), true)?.video)
|
||||
assertEquals(R.raw.block_sunday_rewind, blockIdentFor(at(sunday - 1, ""), at(sunday, "saturday.rewind"), true)?.video)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user