diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 4131261a..1746c7aa 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -3,7 +3,7 @@ plugins { id("org.jetbrains.kotlin.plugin.compose") } /** The release's build number: versionCode is this x 10 plus the edition's channel. */ -val ORBIT_BUILD = 57 +val ORBIT_BUILD = 58 android { namespace = "tv.orbit.classic" compileSdk = 36 diff --git a/android/app/src/main/java/tv/orbit/classic/BlockIdents.kt b/android/app/src/main/java/tv/orbit/classic/BlockIdents.kt index 5dfba799..dcad70fb 100644 --- a/android/app/src/main/java/tv/orbit/classic/BlockIdents.kt +++ b/android/app/src/main/java/tv/orbit/classic/BlockIdents.kt @@ -57,7 +57,15 @@ internal val BlockIdents: Map = mapOf( "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) } + // The new identity (17 November 2026): each Ring X night has its own clip with its name and rope colour in it, so + // nothing is drawn over a shared one any more. + "ringx.monday" to BlockIdent(R.raw.block_ringx_monday, R.raw.block_ringx_nights_sting), + "ringx.tuesday" to BlockIdent(R.raw.block_ringx_tuesday, R.raw.block_ringx_nights_sting), + "ringx.wednesday" to BlockIdent(R.raw.block_ringx_wednesday, R.raw.block_ringx_nights_sting), + "ringx.thursday" to BlockIdent(R.raw.block_ringx_thursday, R.raw.block_ringx_nights_sting), + "ringx.friday" to BlockIdent(R.raw.block_ringx_friday, R.raw.block_ringx_nights_sting), + "ringx.saturday" to BlockIdent(R.raw.block_ringx_saturday, R.raw.block_ringx_nights_sting), +) /** Each channel's Sunday Mornings, for its Saturday Mornings key on a Sunday. */ private val SundayMornings = mapOf( diff --git a/android/app/src/main/java/tv/orbit/classic/ChannelPalette.kt b/android/app/src/main/java/tv/orbit/classic/ChannelPalette.kt new file mode 100644 index 00000000..4a0329ba --- /dev/null +++ b/android/app/src/main/java/tv/orbit/classic/ChannelPalette.kt @@ -0,0 +1,65 @@ +package tv.orbit.classic + +import androidx.compose.ui.graphics.Color + +/** + * Each channel's Sunset Stripes colours, from the brand kit's source/channels.json (Paul approved the kit on 17 November + * 2026): the planet's top, its five stripes, the ring, the background and the glow. Used where a screen takes on the + * channel's look, such as the credits squeeze. Generated by tools/import-brand-kit.py; keep the two in step. + */ +internal class ChannelPalette(top: Long, stripes: LongArray, ring: Long, background: Long, glow: Long) { + val top = Color(top) + val stripes = stripes.map { Color(it) } + val ring = Color(ring) + val background = Color(background) + val glow = Color(glow) +} + +private val Palettes: Map = mapOf( + 101 to ChannelPalette(0xFF8FDCFF, longArrayOf(0xFF3D9BE0, 0xFF3D9BE0, 0xFF2C74C4, 0xFF1F56A3, 0xFF8FDCFF), 0xFFFFFFFF, 0xFF050D1F, 0xFF3D9BE0), + 102 to ChannelPalette(0xFFCDBCFF, longArrayOf(0xFF8F72FF, 0xFF8F72FF, 0xFF6C50E6, 0xFF4D35BD, 0xFFCDBCFF), 0xFFFFFFFF, 0xFF0A0820, 0xFF8F72FF), + 103 to ChannelPalette(0xFFFFA6DC, longArrayOf(0xFFFF4FA3, 0xFFFF4FA3, 0xFFE0338A, 0xFFB8266F, 0xFF7FE3FF), 0xFFFFFFFF, 0xFF160719, 0xFFFF4FA3), + 104 to ChannelPalette(0xFFFFD970, longArrayOf(0xFFF5A524, 0xFFF5A524, 0xFFC9761A, 0xFFC9761A, 0xFF9E5512), 0xFFFFF4D6, 0xFF140D04, 0xFFF5A524), + 105 to ChannelPalette(0xFFD8FF3D, longArrayOf(0xFFFF3DA8, 0xFFFF3DA8, 0xFF8F3DFF, 0xFF5A22C9, 0xFFD8FF3D), 0xFFFFFFFF, 0xFF0C0614, 0xFFFF3DA8), + 106 to ChannelPalette(0xFFFF8AF2, longArrayOf(0xFFC43CFF, 0xFFC43CFF, 0xFF8A2FE0, 0xFF5A20B0, 0xFFFF8AF2), 0xFFFFFFFF, 0xFF09030F, 0xFFC43CFF), + 107 to ChannelPalette(0xFFF2D49A, longArrayOf(0xFFD9A441, 0xFFD9A441, 0xFFC0392B, 0xFF8E2A20, 0xFF5FD6E8), 0xFFFFF7E8, 0xFF0F0A06, 0xFFD9A441), + 108 to ChannelPalette(0xFF7FF0B4, longArrayOf(0xFFFFCF3D, 0xFFFFCF3D, 0xFFFF7A3D, 0xFFFF4F7A, 0xFF7FF0B4), 0xFFFFFFFF, 0xFF071A17, 0xFF2FD18A), + 109 to ChannelPalette(0xFFEFE2C4, longArrayOf(0xFFC9A96A, 0xFFC9A96A, 0xFF9C7D45, 0xFF6F5630, 0xFFEFE2C4), 0xFFFFFFFF, 0xFF0A0908, 0xFFC9A96A), + 110 to ChannelPalette(0xFFFFE066, longArrayOf(0xFFFF5C8A, 0xFFFF5C8A, 0xFFFF3D5F, 0xFFD6204A, 0xFFFFE066), 0xFFFFFFFF, 0xFF16060D, 0xFFFF3D5F), + 201 to ChannelPalette(0xFFC4EBA0, longArrayOf(0xFF4FA36B, 0xFF4FA36B, 0xFF2B8A72, 0xFF1F6F6A, 0xFFC4EBA0), 0xFFF4F9EC, 0xFF06170F, 0xFF4FA36B), + 202 to ChannelPalette(0xFF9FD8FF, longArrayOf(0xFF3F8FD6, 0xFF3F8FD6, 0xFF2F6FA8, 0xFF3D9A6A, 0xFFF2C55C), 0xFFFFF6DC, 0xFF03070F, 0xFF3F8FD6), + 203 to ChannelPalette(0xFFFFD98A, longArrayOf(0xFFE08A2C, 0xFFE08A2C, 0xFF9A6A2A, 0xFF4F7A3A, 0xFF2F5A2A), 0xFFFFFFFF, 0xFF0D0A04, 0xFFE08A2C), + 204 to ChannelPalette(0xFFE8EEF2, longArrayOf(0xFFE2343F, 0xFFE2343F, 0xFFA51F2A, 0xFF6E1219, 0xFF5FD6E8), 0xFFE8EEF2, 0xFF050608, 0xFFA51F2A), + 205 to ChannelPalette(0xFFFFD27A, longArrayOf(0xFFF39A2C, 0xFFF39A2C, 0xFFD9662A, 0xFFA8452A, 0xFFFFE9B8), 0xFFFFF8EA, 0xFF150B05, 0xFFF39A2C), + 206 to ChannelPalette(0xFFFFE1A6, longArrayOf(0xFFD4A24C, 0xFFD4A24C, 0xFFA97A3A, 0xFF6F8A8F, 0xFF3F5F6E), 0xFFFFFAF0, 0xFF0B0D10, 0xFFD4A24C), + 300 to ChannelPalette(0xFFFFE066, longArrayOf(0xFFFF5A4F, 0xFFFF5A4F, 0xFF2FD1C4, 0xFF2FD1C4, 0xFFFFE066), 0xFFFFFFFF, 0xFF0B0718, 0xFFFF5A4F), + 301 to ChannelPalette(0xFFFFE08A, longArrayOf(0xFFF2B53C, 0xFFF2B53C, 0xFFD43A3A, 0xFFA32030, 0xFFFFE08A), 0xFFFFFFFF, 0xFF0D0607, 0xFFD43A3A), + 302 to ChannelPalette(0xFFFFC15E, longArrayOf(0xFFFF7A2E, 0xFFFF7A2E, 0xFFE8461F, 0xFFB52A14, 0xFFFFC15E), 0xFFFFFFFF, 0xFF120603, 0xFFFF7A2E), + 303 to ChannelPalette(0xFF8FF5FF, longArrayOf(0xFF2FC4D9, 0xFF2FC4D9, 0xFF1F8FB0, 0xFF18638A, 0xFF8FF5FF), 0xFFFFFFFF, 0xFF020B10, 0xFF2FC4D9), + 304 to ChannelPalette(0xFFFF4A4A, longArrayOf(0xFFC41A2C, 0xFFA3122A, 0xFF7A0C1D, 0xFF4A0712, 0xFF4A0712), 0xFFEFE3DC, 0xFF0D0204, 0xFFA3122A), + 305 to ChannelPalette(0xFFC9A6FF, longArrayOf(0xFF7A3DFF, 0xFF7A3DFF, 0xFF4F22B8, 0xFF2D1470, 0xFF3DFFB0), 0xFFFFFFFF, 0xFF07040F, 0xFF7A3DFF), + 306 to ChannelPalette(0xFFFFE14D, longArrayOf(0xFFFF4F4F, 0xFFFF9F3D, 0xFFFFE14D, 0xFF3DD6A0, 0xFF3D8FFF), 0xFFFFFFFF, 0xFF071632, 0xFF3D8FFF), + 307 to ChannelPalette(0xFFFFC2D6, longArrayOf(0xFFFF7AA8, 0xFFFF7AA8, 0xFFD95C9C, 0xFF9A4A9E, 0xFFFFD9A8), 0xFFFFFFFF, 0xFF160A1C, 0xFFFF7AA8), + 308 to ChannelPalette(0xFF9FF5E6, longArrayOf(0xFF2FBFA8, 0xFF2FBFA8, 0xFFF2A93C, 0xFFE0663A, 0xFF9FF5E6), 0xFFFFFFFF, 0xFF04100E, 0xFF2FBFA8), + 309 to ChannelPalette(0xFFFFFFFF, longArrayOf(0xFFD9343F, 0xFFD9343F, 0xFFF6F2E4, 0xFF2A4FA8, 0xFF1D3577), 0xFFFFFFFF, 0xFF050814, 0xFFD9343F), + 310 to ChannelPalette(0xFFFFFFFF, longArrayOf(0xFFE0323C, 0xFFE0323C, 0xFF2F9A5A, 0xFF1F6E40, 0xFFF6D04D), 0xFFF6D04D, 0xFF06120C, 0xFFE0323C), + 401 to ChannelPalette(0xFFE6EBF2, longArrayOf(0xFFFF2E3D, 0xFFFF2E3D, 0xFFC41522, 0xFF8A0D17, 0xFFE6EBF2), 0xFFFFFFFF, 0xFF0B0B0F, 0xFFFF2E3D), + 601 to ChannelPalette(0xFF5EF3FF, longArrayOf(0xFF3A6BFF, 0xFF3A6BFF, 0xFF7B4DFF, 0xFFB23CFF, 0xFFB23CFF), 0xFFFFFFFF, 0xFF0A0A2A, 0xFF3A6BFF), + 602 to ChannelPalette(0xFFF6F2E4, longArrayOf(0xFF3D6FD9, 0xFF3D6FD9, 0xFF2A4FA8, 0xFFD9343F, 0xFFF6D04D), 0xFFFFFFFF, 0xFF050A1A, 0xFF3D6FD9), + 603 to ChannelPalette(0xFFD8FF3D, longArrayOf(0xFF7DFF3D, 0xFF7DFF3D, 0xFF2FC46B, 0xFF1F7A4F, 0xFFD8FF3D), 0xFFFFFFFF, 0xFF040A06, 0xFF7DFF3D), + 604 to ChannelPalette(0xFF4FF0FF, longArrayOf(0xFFB45CFF, 0xFFB45CFF, 0xFFFF4FA3, 0xFFFF4FA3, 0xFF4FF0FF), 0xFFFFFFFF, 0xFF110726, 0xFFFF4FA3), + 605 to ChannelPalette(0xFFFFE14D, longArrayOf(0xFFFF4FD8, 0xFFFF4FD8, 0xFF4FC3FF, 0xFF4FC3FF, 0xFFFFE14D), 0xFFFFFFFF, 0xFF141A2E, 0xFFFF4FD8), + 611 to ChannelPalette(0xFF9EF0FF, longArrayOf(0xFFFFB13D, 0xFFFFB13D, 0xFF7AD35A, 0xFF3FB0E0, 0xFF9EF0FF), 0xFFFFFFFF, 0xFF0B1A33, 0xFF3FB0E0), + 612 to ChannelPalette(0xFFF4F0FF, longArrayOf(0xFFF6D04D, 0xFFF6D04D, 0xFF8F8CFF, 0xFF5A56C9, 0xFFF4F0FF), 0xFFF6D04D, 0xFF070A1F, 0xFF5A56C9), + 613 to ChannelPalette(0xFF7DFF8A, longArrayOf(0xFF2FD16B, 0xFF2FD16B, 0xFF4F7DFF, 0xFFFF4FD8, 0xFFFFE14D), 0xFFFFFFFF, 0xFF06060F, 0xFF4F7DFF), + 614 to ChannelPalette(0xFFFFD970, longArrayOf(0xFFFFAB70, 0xFFFFAB70, 0xFFF7A1C4, 0xFFF7A1C4, 0xFFFFD970), 0xFFFFFFFF, 0xFF1D1430, 0xFFF7A1C4), +) + +private val PackPalettes: Map = mapOf( + "orbit-mistletoe" to ChannelPalette(0xFFFFF1F1, longArrayOf(0xFFE8576B, 0xFFE8576B, 0xFF4FA36B, 0xFF2F7A4F, 0xFFF6D04D), 0xFFF6D04D, 0xFF140A0D, 0xFFE8576B), + "orbit-sakura" to ChannelPalette(0xFFFFE3EC, longArrayOf(0xFFFFA8C5, 0xFFFFA8C5, 0xFFF07AA6, 0xFFC2507F, 0xFFFFE3EC), 0xFFFFFFFF, 0xFF140B14, 0xFFF07AA6), +) + +/** Orbit 1's colours stand in for a channel without its own. */ +internal fun channelPalette(number: Int): ChannelPalette = + Palettes[number] ?: CustomChannels.of(number)?.brand?.let { PackPalettes[it] } ?: Palettes.getValue(101) diff --git a/android/app/src/main/java/tv/orbit/classic/EmbyPlaybackDialog.kt b/android/app/src/main/java/tv/orbit/classic/EmbyPlaybackDialog.kt index 82463532..8360496f 100644 --- a/android/app/src/main/java/tv/orbit/classic/EmbyPlaybackDialog.kt +++ b/android/app/src/main/java/tv/orbit/classic/EmbyPlaybackDialog.kt @@ -455,8 +455,10 @@ internal fun EmbyPlaybackDialog(session: EmbySampleSession, plan: EmbyPlaybackPl } } if (window != null) SideEffect { window.onBack = dismiss } val content: @Composable () -> Unit = { - Box(Modifier.fillMaxSize().background(if (squeeze > 0f) Navy else Color.Black)) { - val framed = if (squeeze <= 0f) Modifier.fillMaxSize() else Modifier.padding(start = (36 * squeeze).dp, top = (60 * squeeze).dp) + // Squeezed, the screen takes on the channel's colours (the brand kit's redesign, 17 November 2026). + val squeezeBack = scheduled?.channel?.number?.let { channelPalette(it).background } ?: Navy + Box(Modifier.fillMaxSize().background(if (squeeze > 0f) squeezeBack else Color.Black).then(if (squeeze > 0f) Modifier.background(squeezeBackdrop(scheduled?.channel?.number)) else Modifier)) { + val framed = if (squeeze <= 0f) Modifier.fillMaxSize() else Modifier.padding(start = (SQUEEZE_LEFT_DP * squeeze).dp, top = (SQUEEZE_TOP_DP * squeeze).dp) .fillMaxWidth(1f - SQUEEZE_SHRINK * squeeze).fillMaxHeight(1f - SQUEEZE_SHRINK * squeeze) // Subtitles lift clear of the programme bar while it's up, and settle back to the foot of the picture after. val subtitlesLifted = (infoVisible || trackMenu != null) && ready && squeeze == 0f diff --git a/android/app/src/main/java/tv/orbit/classic/SqueezeBack.kt b/android/app/src/main/java/tv/orbit/classic/SqueezeBack.kt index 566fe23e..de23e295 100644 --- a/android/app/src/main/java/tv/orbit/classic/SqueezeBack.kt +++ b/android/app/src/main/java/tv/orbit/classic/SqueezeBack.kt @@ -53,6 +53,25 @@ internal fun squeezeCast(number: Int): OrbCharacter? = if (number == TOTS_NUMBER /** Two programmes of the same series one after the other: Keep watching rather than Next. */ internal fun keepWatching(current: SampleBroadcast, next: SampleBroadcast) = seriesKey(guideTitleParts(current.media.item.title).first) == seriesKey(guideTitleParts(next.media.item.title).first) +/** + * Where the picture sits while squeezed, in dp on the 960 x 540 screen: the brand kit's redesign (17 November 2026), a + * framed window on the left with the channel's own colours round it. + */ +internal const val SQUEEZE_LEFT_DP = 48 +internal const val SQUEEZE_TOP_DP = 118 + +/** Behind the squeezed picture: the channel's background, lit by its glow from the lower right and faintly from the top left. */ +internal fun squeezeBackdrop(number: Int?): androidx.compose.ui.graphics.Brush { + val p = channelPalette(number ?: 101) + return object : androidx.compose.ui.graphics.ShaderBrush() { + override fun createShader(size: androidx.compose.ui.geometry.Size): androidx.compose.ui.graphics.Shader { + // One flat colour and two soft glows, drawn as a single radial gradient each: no live blur on the boxes. + return androidx.compose.ui.graphics.RadialGradientShader(Offset(size.width * .85f, size.height * 1.1f), size.width * .62f, + listOf(p.glow.copy(alpha = .45f), p.background.copy(alpha = 0f))) + } + } +} + /** Everything around the framed picture. The picture itself is the player, drawn smaller underneath. */ @Composable internal fun SqueezePanel(session: EmbySampleSession, channel: SampleChannel, current: SampleBroadcast, next: SampleBroadcast, nowMs: Long, shown: Float) { @@ -64,46 +83,78 @@ internal fun SqueezePanel(session: EmbySampleSession, channel: SampleChannel, cu LaunchedEffect(calm) { if (!calm) { val start = withFrameMillis { it }; while (true) withFrameMillis { t = it - start } } } val later = remember(next.startMs) { channel.guide(next.endMs, 3) } val brand = ChannelBrands.forNumber(channel.number) + val p = channelPalette(channel.number) + val short = (brand?.displayName ?: channel.name).removePrefix("Orbit ") val keep = keepWatching(current, next) val (name, detail) = guideTitleParts(next.media.item.title) val seconds = ((next.startMs - nowMs) / 1000).coerceAtLeast(0) + val lengthS = (squeezeLength(current.media.item.type) / 1000).coerceAtLeast(1) + val queue = OrbitCompanion.queue + val queued = queue.firstOrNull() + // Queued from the phone (Paul, 6 November 2026): Up next is the queue's, in Catch Up's green or the accent for a channel + // live. It's read as it draws, so cancelling the queue brings the channel's own next straight back. + val tint = when { queued == null -> p.top; queued.catchUpStartMs != null -> CatchUpGreen; else -> Yellow } Box(Modifier.fillMaxSize().graphicsLayer { alpha = shown }) { - if (brand != null) Image(cachedPainter(brand.logo), brand.displayName, Modifier.padding(start = 36.dp, top = 14.dp).logoPlate().width(120.dp).height(38.dp)) - // Queued from the phone (Paul, 6 November 2026): Up next is the queue's, in Catch Up's green or the accent for a - // channel live. It's read as it draws, so cancelling the queue brings the channel's own next straight back. - val queue = OrbitCompanion.queue - val queued = queue.firstOrNull() - if (queued != null) Column(Modifier.align(Alignment.TopEnd).padding(top = 60.dp, end = 36.dp).width(360.dp), verticalArrangement = Arrangement.spacedBy(6.dp)) { - val tint = if (queued.catchUpStartMs != null) CatchUpGreen else Yellow - Text("UP NEXT · YOUR QUEUE", color = tint, fontFamily = Anton, fontSize = 22.sp, maxLines = 1) - Text(if (seconds >= 60) "in about a minute" else "in $seconds seconds", color = Muted, fontSize = 13.sp) - Box(Modifier.fillMaxWidth().height(160.dp).clip(RoundedCornerShape(8.dp)).background(Panel).border(3.dp, tint, RoundedCornerShape(8.dp))) { - QueuedArtwork(session, queued.itemId, queued.seriesId, Modifier.fillMaxSize()) - Text(if (queued.catchUpStartMs != null) "CATCH UP" else "LIVE", Modifier.align(Alignment.TopStart).padding(8.dp).background(tint, RoundedCornerShape(4.dp)) - .padding(horizontal = 7.dp, vertical = 2.dp), color = OnAccent, fontWeight = FontWeight.Bold, fontSize = 12.sp) - } - Text(queued.title, color = Ink, fontSize = 18.sp, fontWeight = FontWeight.SemiBold, maxLines = 1, overflow = TextOverflow.Ellipsis) - Text(listOfNotNull(queued.sub, "${if (queued.catchUpStartMs != null) "From the start" else "Live"} on ${queued.number} ${queued.channel}").joinToString(" · "), - color = Muted, fontSize = 13.sp, maxLines = 1, overflow = TextOverflow.Ellipsis) + // A faint top-left glow, over the backdrop the player draws. + Canvas(Modifier.fillMaxSize()) { + drawRect(androidx.compose.ui.graphics.Brush.radialGradient(listOf(p.glow.copy(alpha = .16f), Color.Transparent), Offset(size.width * .1f, 0f), size.width * .45f)) } - // Beside the picture: what's next. - else Column(Modifier.align(Alignment.TopEnd).padding(top = 60.dp, end = 36.dp).width(360.dp), verticalArrangement = Arrangement.spacedBy(6.dp)) { - Text(if (keep) "KEEP WATCHING" else "NEXT ON ${(brand?.displayName ?: channel.name).removePrefix("Orbit ").uppercase()}", color = Yellow, fontFamily = Anton, fontSize = 22.sp, maxLines = 1) - Text(if (seconds >= 60) "in about a minute" else "in $seconds seconds", color = Muted, fontSize = 13.sp) - Box(Modifier.fillMaxWidth().height(160.dp).clip(RoundedCornerShape(8.dp)).background(Panel)) { - ProgrammeArtwork(session, channel, next, Modifier.fillMaxSize()) + // The channel's logo, top left. + if (brand != null) Image(cachedPainter(brand.logo), brand.displayName, Modifier.padding(start = SQUEEZE_LEFT_DP.dp, top = 30.dp).height(56.dp).width(150.dp), + alignment = Alignment.CenterStart) + // A thin frame round the picture, which the player draws underneath. + BoxWithConstraints(Modifier.fillMaxSize()) { + val w = maxWidth * (1f - SQUEEZE_SHRINK); val h = maxHeight * (1f - SQUEEZE_SHRINK) + Box(Modifier.padding(start = SQUEEZE_LEFT_DP.dp, top = SQUEEZE_TOP_DP.dp).size(w, h).border(1.dp, Color.White.copy(alpha = .12f), RoundedCornerShape(4.dp))) + // What's ending, under the picture. + Row(Modifier.padding(start = SQUEEZE_LEFT_DP.dp, top = SQUEEZE_TOP_DP.dp + h + 12.dp).width(w), horizontalArrangement = Arrangement.spacedBy(8.dp), verticalAlignment = Alignment.CenterVertically) { + Text("NOW ENDING", Modifier.border(1.dp, p.ring.copy(alpha = .5f), RoundedCornerShape(3.dp)).padding(horizontal = 5.dp, vertical = 1.dp), + color = p.ring, fontSize = 10.sp, fontWeight = FontWeight.Bold, letterSpacing = 1.6.sp) + Text(guideTitleParts(current.media.item.title).first, color = Ink.copy(alpha = .75f), fontSize = 14.sp, fontWeight = FontWeight.SemiBold, maxLines = 1, overflow = TextOverflow.Ellipsis) } - Text(if (keep) (detail ?: name) else name, color = Ink, fontSize = 18.sp, fontWeight = FontWeight.SemiBold, maxLines = 1, overflow = TextOverflow.Ellipsis) + } + // Beside the picture: what's next, large, with a countdown. + Column(Modifier.align(Alignment.TopEnd).padding(top = 34.dp, end = 45.dp).width(320.dp), verticalArrangement = Arrangement.spacedBy(7.dp)) { + Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) { + Text(when { queued != null -> "UP NEXT · YOUR QUEUE"; keep -> "KEEP WATCHING"; else -> "NEXT ON ${short.uppercase()}" }, + color = if (queued != null) tint else p.ring, fontSize = 12.sp, fontWeight = FontWeight.Bold, letterSpacing = 2.9.sp, maxLines = 1) + Box(Modifier.weight(1f).height(1.dp).background(androidx.compose.ui.graphics.Brush.horizontalGradient(listOf(p.ring.copy(alpha = .4f), Color.Transparent)))) + } + Box(Modifier.width(280.dp).height(157.dp).clip(RoundedCornerShape(11.dp)).background(p.stripes[3]).border(1.dp, Color.White.copy(alpha = .08f), RoundedCornerShape(11.dp))) { + if (queued != null) { + QueuedArtwork(session, queued.itemId, queued.seriesId, Modifier.fillMaxSize()) + Text(if (queued.catchUpStartMs != null) "CATCH UP" else "LIVE", Modifier.align(Alignment.TopStart).padding(8.dp).background(tint, RoundedCornerShape(4.dp)) + .padding(horizontal = 7.dp, vertical = 2.dp), color = OnAccent, fontWeight = FontWeight.Bold, fontSize = 12.sp) + } else ProgrammeArtwork(session, channel, next, Modifier.fillMaxSize()) + } + Text(when { queued != null -> queued.title; keep -> detail ?: name; else -> name }, color = Color.White, fontFamily = Anton, fontSize = if (name.length > 22) 30.sp else 40.sp, + maxLines = 1, overflow = TextOverflow.Ellipsis) Text(when { + queued != null -> listOfNotNull(queued.sub, "${if (queued.catchUpStartMs != null) "From the start" else "Live"} on ${queued.number} ${queued.channel}").joinToString(" · ") keep -> "Straight after the credits" - detail != null -> detail + detail != null -> "$detail · ${next.media.durationMs / 60_000} min" else -> "${next.media.durationMs / 60_000} min" - }, color = Muted, fontSize = 13.sp, maxLines = 1, overflow = TextOverflow.Ellipsis) + }, color = Ink.copy(alpha = .72f), fontSize = 13.sp, fontWeight = FontWeight.SemiBold, maxLines = 1, overflow = TextOverflow.Ellipsis) + Row(Modifier.padding(top = 4.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(11.dp)) { + Box(Modifier.size(52.dp), contentAlignment = Alignment.Center) { + Canvas(Modifier.fillMaxSize()) { + val stroke = androidx.compose.ui.graphics.drawscope.Stroke(width = size.width * .085f, cap = androidx.compose.ui.graphics.StrokeCap.Round) + val inset = stroke.width / 2 + val arcSize = androidx.compose.ui.geometry.Size(size.width - stroke.width, size.height - stroke.width) + drawArc(Color.White.copy(alpha = .12f), 0f, 360f, false, Offset(inset, inset), arcSize, style = stroke) + drawArc(tint, -90f, 360f * (seconds.toFloat() / lengthS).coerceIn(0f, 1f), false, Offset(inset, inset), arcSize, style = stroke) + } + Text("$seconds", color = Color.White, fontFamily = Anton, fontSize = 24.sp) + } + Text(if (seconds >= 60) "Starting in about a minute" else "Starting in $seconds seconds", color = Ink, fontSize = 15.sp, fontWeight = FontWeight.Bold) + } } - // Underneath: later on the channel, with its cast member. - Row(Modifier.align(Alignment.BottomCenter).padding(start = 36.dp, end = 36.dp, bottom = 28.dp).fillMaxWidth().height(110.dp) - .background(Panel, RoundedCornerShape(12.dp)).padding(horizontal = 16.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(16.dp)) { - if (castOn) Canvas(Modifier.size(80.dp)) { + // Underneath: later on the channel, or the rest of the queue, on a translucent strip in the channel's colour. + Row(Modifier.align(Alignment.BottomCenter).padding(start = SQUEEZE_LEFT_DP.dp, end = SQUEEZE_LEFT_DP.dp, bottom = 24.dp).fillMaxWidth().height(58.dp) + .clip(RoundedCornerShape(13.dp)).background(p.background.copy(alpha = .55f)).background(Color.White.copy(alpha = .06f)) + .border(1.dp, Color.White.copy(alpha = .08f), RoundedCornerShape(13.dp)).padding(horizontal = 18.dp), + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(17.dp)) { + if (castOn) Canvas(Modifier.size(44.dp)) { val bob = if (calm) 0f else sin(t / 650.0).toFloat() * size.height * .05f val shut = !calm && (t % 3_400) < 150 val who = squeezeCast(channel.number) @@ -111,27 +162,29 @@ internal fun SqueezePanel(session: EmbySampleSession, channel: SampleChannel, cu if (who == null) drawOrbMascot(c, size.minDimension * .26f, blink = shut) else drawOrbChaser(c, size.minDimension * .34f, who, OrbDir.Right, false, false, false, t / 400f, eyesShut = shut) } - if (queued != null) Column(verticalArrangement = Arrangement.spacedBy(4.dp)) { - Text(if (queue.size > 1) "THEN FROM YOUR QUEUE" else "FROM YOUR PHONE", color = Muted, fontSize = 12.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 1.sp) - if (queue.size > 1) Row(horizontalArrangement = Arrangement.spacedBy(28.dp)) { - queue.drop(1).take(3).forEachIndexed { i, q -> - Row(horizontalArrangement = Arrangement.spacedBy(8.dp), verticalAlignment = Alignment.CenterVertically) { - Text("${i + 2}", color = if (q.catchUpStartMs != null) CatchUpGreen else Yellow, fontFamily = BarlowCondensed, fontSize = 18.sp) - Text(q.title, color = Ink, fontSize = 15.sp, fontWeight = FontWeight.SemiBold, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.widthIn(max = 200.dp)) - } - } - } else Text("Queued on Orbit Companion. Remove it there to stay on ${(brand?.displayName ?: channel.name)}.", color = Ink, fontSize = 15.sp, maxLines = 1, overflow = TextOverflow.Ellipsis) - } else Column(verticalArrangement = Arrangement.spacedBy(4.dp)) { - Text("LATER ON ${(brand?.displayName ?: channel.name).removePrefix("Orbit ").uppercase()}", color = Muted, fontSize = 12.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 1.sp) - Row(horizontalArrangement = Arrangement.spacedBy(28.dp)) { - later.forEach { show -> - Row(horizontalArrangement = Arrangement.spacedBy(8.dp), verticalAlignment = Alignment.CenterVertically) { - Text(clock(show.startMs), color = Yellow, fontFamily = BarlowCondensed, fontSize = 18.sp) - Text(guideTitleParts(show.media.item.title).first, color = Ink, fontSize = 15.sp, fontWeight = FontWeight.SemiBold, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.widthIn(max = 200.dp)) - } - } - } + Text(if (queued != null) (if (queue.size > 1) "THEN FROM\nYOUR QUEUE" else "FROM YOUR\nPHONE") else "LATER ON\n${short.uppercase()}", + Modifier.width(78.dp), color = p.ring, fontSize = 11.sp, fontWeight = FontWeight.Bold, letterSpacing = 2.6.sp, lineHeight = 14.sp, maxLines = 2) + if (queued != null) { + if (queue.size > 1) queue.drop(1).take(3).forEachIndexed { i, q -> + LaterSlot("${i + 2}", q.title, if (q.catchUpStartMs != null) CatchUpGreen else Yellow) + } else Text("Queued on Orbit Companion. Remove it there to stay on ${brand?.displayName ?: channel.name}.", color = Ink, fontSize = 15.sp, maxLines = 1, overflow = TextOverflow.Ellipsis) + } else later.forEach { show -> LaterSlot(clock(show.startMs), guideTitleParts(show.media.item.title).first, p.top) } + Spacer(Modifier.weight(1f)) + // The stripe rule from the ident, tying it back to the channel. + Column(Modifier.width(90.dp), verticalArrangement = Arrangement.spacedBy(2.5.dp)) { + p.stripes.forEachIndexed { i, colour -> Box(Modifier.fillMaxWidth().height(listOf(4, 3, 2.5f, 2, 1.5f)[i].toFloat().dp).background(colour, RoundedCornerShape(1.dp))) } } } } } + +@Composable +private fun LaterSlot(time: String, title: String, colour: Color) { + Row(verticalAlignment = Alignment.CenterVertically) { + Box(Modifier.width(1.dp).height(36.dp).background(Color.White.copy(alpha = .08f))) + Column(Modifier.padding(start = 17.dp)) { + Text(time, color = colour, fontFamily = Anton, fontSize = 20.sp, lineHeight = 20.sp) + Text(title, color = Color.White, fontSize = 14.sp, fontWeight = FontWeight.Bold, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.widthIn(max = 170.dp)) + } + } +} diff --git a/android/app/src/main/res/raw/block_afterdark_bmovie.mp4 b/android/app/src/main/res/raw/block_afterdark_bmovie.mp4 index 600834f9..689b4129 100644 Binary files a/android/app/src/main/res/raw/block_afterdark_bmovie.mp4 and b/android/app/src/main/res/raw/block_afterdark_bmovie.mp4 differ diff --git a/android/app/src/main/res/raw/block_afterdark_cult.mp4 b/android/app/src/main/res/raw/block_afterdark_cult.mp4 index 7060264a..9fd7b575 100644 Binary files a/android/app/src/main/res/raw/block_afterdark_cult.mp4 and b/android/app/src/main/res/raw/block_afterdark_cult.mp4 differ diff --git a/android/app/src/main/res/raw/block_afterdark_drivein.mp4 b/android/app/src/main/res/raw/block_afterdark_drivein.mp4 index 3989188d..0ce1e837 100644 Binary files a/android/app/src/main/res/raw/block_afterdark_drivein.mp4 and b/android/app/src/main/res/raw/block_afterdark_drivein.mp4 differ diff --git a/android/app/src/main/res/raw/block_gold_sunday.mp4 b/android/app/src/main/res/raw/block_gold_sunday.mp4 index 365c168b..3893e9a4 100644 Binary files a/android/app/src/main/res/raw/block_gold_sunday.mp4 and b/android/app/src/main/res/raw/block_gold_sunday.mp4 differ diff --git a/android/app/src/main/res/raw/block_horror_slasher.mp4 b/android/app/src/main/res/raw/block_horror_slasher.mp4 index 8043f191..c7a3e24f 100644 Binary files a/android/app/src/main/res/raw/block_horror_slasher.mp4 and b/android/app/src/main/res/raw/block_horror_slasher.mp4 differ diff --git a/android/app/src/main/res/raw/block_orbit2_retro.mp4 b/android/app/src/main/res/raw/block_orbit2_retro.mp4 index 2d997c0f..2b85f0b0 100644 Binary files a/android/app/src/main/res/raw/block_orbit2_retro.mp4 and b/android/app/src/main/res/raw/block_orbit2_retro.mp4 differ diff --git a/android/app/src/main/res/raw/block_orbit2_spooky.mp4 b/android/app/src/main/res/raw/block_orbit2_spooky.mp4 index e9806ea1..a68d5495 100644 Binary files a/android/app/src/main/res/raw/block_orbit2_spooky.mp4 and b/android/app/src/main/res/raw/block_orbit2_spooky.mp4 differ diff --git a/android/app/src/main/res/raw/block_ringx_friday.mp4 b/android/app/src/main/res/raw/block_ringx_friday.mp4 new file mode 100644 index 00000000..ee9393a4 Binary files /dev/null and b/android/app/src/main/res/raw/block_ringx_friday.mp4 differ diff --git a/android/app/src/main/res/raw/block_ringx_monday.mp4 b/android/app/src/main/res/raw/block_ringx_monday.mp4 new file mode 100644 index 00000000..10696de1 Binary files /dev/null and b/android/app/src/main/res/raw/block_ringx_monday.mp4 differ diff --git a/android/app/src/main/res/raw/block_ringx_nights.mp4 b/android/app/src/main/res/raw/block_ringx_nights.mp4 deleted file mode 100644 index 2dc86553..00000000 Binary files a/android/app/src/main/res/raw/block_ringx_nights.mp4 and /dev/null differ diff --git a/android/app/src/main/res/raw/block_ringx_ppv.mp4 b/android/app/src/main/res/raw/block_ringx_ppv.mp4 index c9670f65..90522719 100644 Binary files a/android/app/src/main/res/raw/block_ringx_ppv.mp4 and b/android/app/src/main/res/raw/block_ringx_ppv.mp4 differ diff --git a/android/app/src/main/res/raw/block_ringx_saturday.mp4 b/android/app/src/main/res/raw/block_ringx_saturday.mp4 new file mode 100644 index 00000000..bf565ae7 Binary files /dev/null and b/android/app/src/main/res/raw/block_ringx_saturday.mp4 differ diff --git a/android/app/src/main/res/raw/block_ringx_thursday.mp4 b/android/app/src/main/res/raw/block_ringx_thursday.mp4 new file mode 100644 index 00000000..8a353ff9 Binary files /dev/null and b/android/app/src/main/res/raw/block_ringx_thursday.mp4 differ diff --git a/android/app/src/main/res/raw/block_ringx_tuesday.mp4 b/android/app/src/main/res/raw/block_ringx_tuesday.mp4 new file mode 100644 index 00000000..5c0d10b7 Binary files /dev/null and b/android/app/src/main/res/raw/block_ringx_tuesday.mp4 differ diff --git a/android/app/src/main/res/raw/block_ringx_wednesday.mp4 b/android/app/src/main/res/raw/block_ringx_wednesday.mp4 new file mode 100644 index 00000000..c54202d8 Binary files /dev/null and b/android/app/src/main/res/raw/block_ringx_wednesday.mp4 differ diff --git a/android/app/src/main/res/raw/block_riot_afterhours.mp4 b/android/app/src/main/res/raw/block_riot_afterhours.mp4 index 1cec727b..a5e0c6c5 100644 Binary files a/android/app/src/main/res/raw/block_riot_afterhours.mp4 and b/android/app/src/main/res/raw/block_riot_afterhours.mp4 differ diff --git a/android/app/src/main/res/raw/block_riot_laughs.mp4 b/android/app/src/main/res/raw/block_riot_laughs.mp4 index a71b319b..12284e0e 100644 Binary files a/android/app/src/main/res/raw/block_riot_laughs.mp4 and b/android/app/src/main/res/raw/block_riot_laughs.mp4 differ diff --git a/android/app/src/main/res/raw/block_riot_stunts.mp4 b/android/app/src/main/res/raw/block_riot_stunts.mp4 index 958a8877..cbe41f7b 100644 Binary files a/android/app/src/main/res/raw/block_riot_stunts.mp4 and b/android/app/src/main/res/raw/block_riot_stunts.mp4 differ diff --git a/android/app/src/main/res/raw/block_saturday_heroes.mp4 b/android/app/src/main/res/raw/block_saturday_heroes.mp4 index 9d3d043b..2ba87126 100644 Binary files a/android/app/src/main/res/raw/block_saturday_heroes.mp4 and b/android/app/src/main/res/raw/block_saturday_heroes.mp4 differ diff --git a/android/app/src/main/res/raw/block_saturday_orbitx.mp4 b/android/app/src/main/res/raw/block_saturday_orbitx.mp4 index 3fc1bf1f..24b92b85 100644 Binary files a/android/app/src/main/res/raw/block_saturday_orbitx.mp4 and b/android/app/src/main/res/raw/block_saturday_orbitx.mp4 differ diff --git a/android/app/src/main/res/raw/block_saturday_rewind.mp4 b/android/app/src/main/res/raw/block_saturday_rewind.mp4 index 622c0d13..a7138256 100644 Binary files a/android/app/src/main/res/raw/block_saturday_rewind.mp4 and b/android/app/src/main/res/raw/block_saturday_rewind.mp4 differ diff --git a/android/app/src/main/res/raw/block_sunday_heroes.mp4 b/android/app/src/main/res/raw/block_sunday_heroes.mp4 index 1c9aad99..be9640c8 100644 Binary files a/android/app/src/main/res/raw/block_sunday_heroes.mp4 and b/android/app/src/main/res/raw/block_sunday_heroes.mp4 differ diff --git a/android/app/src/main/res/raw/block_sunday_orbitx.mp4 b/android/app/src/main/res/raw/block_sunday_orbitx.mp4 index b9304c20..c0543523 100644 Binary files a/android/app/src/main/res/raw/block_sunday_orbitx.mp4 and b/android/app/src/main/res/raw/block_sunday_orbitx.mp4 differ diff --git a/android/app/src/main/res/raw/block_sunday_rewind.mp4 b/android/app/src/main/res/raw/block_sunday_rewind.mp4 index bcd694a9..12e6441b 100644 Binary files a/android/app/src/main/res/raw/block_sunday_rewind.mp4 and b/android/app/src/main/res/raw/block_sunday_rewind.mp4 differ diff --git a/android/app/src/main/res/raw/block_terra_sunday.mp4 b/android/app/src/main/res/raw/block_terra_sunday.mp4 index 299e3a06..59da62e6 100644 Binary files a/android/app/src/main/res/raw/block_terra_sunday.mp4 and b/android/app/src/main/res/raw/block_terra_sunday.mp4 differ diff --git a/android/app/src/main/res/raw/block_three_scottish.mp4 b/android/app/src/main/res/raw/block_three_scottish.mp4 index 306f4872..dfae61b2 100644 Binary files a/android/app/src/main/res/raw/block_three_scottish.mp4 and b/android/app/src/main/res/raw/block_three_scottish.mp4 differ diff --git a/android/app/src/main/res/raw/block_vortex_afterburn.mp4 b/android/app/src/main/res/raw/block_vortex_afterburn.mp4 index 0bf202e0..fc97d62b 100644 Binary files a/android/app/src/main/res/raw/block_vortex_afterburn.mp4 and b/android/app/src/main/res/raw/block_vortex_afterburn.mp4 differ diff --git a/android/app/src/main/res/raw/block_vortex_movie.mp4 b/android/app/src/main/res/raw/block_vortex_movie.mp4 index fee6bea9..d772a139 100644 Binary files a/android/app/src/main/res/raw/block_vortex_movie.mp4 and b/android/app/src/main/res/raw/block_vortex_movie.mp4 differ diff --git a/android/app/src/main/res/raw/block_vortex_premiere.mp4 b/android/app/src/main/res/raw/block_vortex_premiere.mp4 index ccbec6b3..73362397 100644 Binary files a/android/app/src/main/res/raw/block_vortex_premiere.mp4 and b/android/app/src/main/res/raw/block_vortex_premiere.mp4 differ diff --git a/android/app/src/main/res/raw/block_vortex_prime.mp4 b/android/app/src/main/res/raw/block_vortex_prime.mp4 index 057d72ae..481d1cef 100644 Binary files a/android/app/src/main/res/raw/block_vortex_prime.mp4 and b/android/app/src/main/res/raw/block_vortex_prime.mp4 differ diff --git a/android/app/src/main/res/raw/drive_in_intro.mp4 b/android/app/src/main/res/raw/drive_in_intro.mp4 index 268efbbc..f75187d5 100644 Binary files a/android/app/src/main/res/raw/drive_in_intro.mp4 and b/android/app/src/main/res/raw/drive_in_intro.mp4 differ diff --git a/android/app/src/test/java/tv/orbit/classic/PresentationTest.kt b/android/app/src/test/java/tv/orbit/classic/PresentationTest.kt index 63818149..76a8e7aa 100644 --- a/android/app/src/test/java/tv/orbit/classic/PresentationTest.kt +++ b/android/app/src/test/java/tv/orbit/classic/PresentationTest.kt @@ -103,11 +103,12 @@ class PresentationTest { assertTrue(BlockIdents.keys.none { it.startsWith("drivein.") || it.startsWith("premiere.") || it.startsWith("themed.") }) } - @Test fun ringXNightsShareOneClipAndEachHasItsName() { - val nights = BlockIdents.filterValues { it.overlay == BlockOverlay.RingXNight } + /** The new identity (17 November 2026): each night is its own clip with its name in it, nothing drawn over it. */ + @Test fun ringXNightsEachHaveTheirOwnClip() { + val nights = BlockIdents.filterKeys { it in RingXNights } assertEquals(6, nights.size) - assertEquals(1, nights.values.map { it.video }.toSet().size) - nights.keys.forEach { assertNotNull(RingXNights[it]) } + assertEquals(6, nights.values.map { it.video }.toSet().size) + assertTrue(nights.values.all { it.overlay == BlockOverlay.None }) } @Test fun thePpvLowerThirdUsesTheBookedTitleAndNothingIfThereIsNone() { diff --git a/tools/import-brand-kit.py b/tools/import-brand-kit.py index 56662f21..14e1e252 100644 --- a/tools/import-brand-kit.py +++ b/tools/import-brand-kit.py @@ -88,7 +88,12 @@ def main(): ident(os.path.join(KIT, "channels", "orbit-tots", "orbit-tots-ident.mp4"), f"res/raw/ident_{name}.mp4") for slug, name in (("orbit-mistletoe", "mistletoe"), ("orbit-sakura", "sakura")): ident(os.path.join(KIT, "channels", slug, f"{slug}-ident.mp4"), f"res/raw/ident_{name}.mp4") - print(f"idents: {len(idents) + 5}") + ident(os.path.join(KIT, "channels", "orbit-drive-in", "orbit-drive-in-ident.mp4"), "res/raw/drive_in_intro.mp4") + print(f"idents: {len(idents) + 6}, with the Drive-In intro") + # Block and event idents: rendered by the kit's source/block-render.js from source/blocks.json, 4 s, silent (each has a sting). + blocks = sorted(f for f in os.listdir(need(os.path.join(KIT, "blocks"))) if f.endswith(".mp4")) + for f in blocks: run("cp", os.path.join(KIT, "blocks", f), os.path.join(RES, "raw", f)) + print(f"block idents: {len(blocks)}") po = os.path.join(KIT, "planet-o") webp(os.path.join(stage, "wordmark.png"), os.path.join(nodpi, "orbit_logo.webp"))