From 12bd4590b4c5e62e7ebabc4935116d01caebc06d Mon Sep 17 00:00:00 2001 From: Pauljd Date: Mon, 2 Nov 2026 12:41:45 +0000 Subject: [PATCH] Show the Drive-In card straight away, with whole day names (0.70.1) Co-Authored-By: Claude Opus 5.5 (1M context) --- VERIFICATION-0.70.1.md | 5 +++++ android/app/build.gradle.kts | 4 ++-- android/app/src/main/java/tv/orbit/classic/EmbyClient.kt | 2 +- .../src/main/java/tv/orbit/classic/EmbyConnectionScreen.kt | 4 ++++ android/app/src/main/java/tv/orbit/classic/HomeScreen.kt | 2 +- .../src/main/java/tv/orbit/classic/SecureMediaDataSource.kt | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 VERIFICATION-0.70.1.md diff --git a/VERIFICATION-0.70.1.md b/VERIFICATION-0.70.1.md new file mode 100644 index 0000000..73e3789 --- /dev/null +++ b/VERIFICATION-0.70.1.md @@ -0,0 +1,5 @@ +# Orbit TV 0.70.1: Drive-In card fixes + +Found while checking 0.70 on the box. The main menu's Drive-In card took about 20 seconds to fill after opening, because it waited for a full round of channels; it now shows what's booked straight away. Its upcoming lines said "Ton" and "Tom"; they now say Tonight and Tomorrow. + +On 0.70 the on-screen layout read back with everything inside the screen, and the catalogue was unchanged. Checked here: build, lint and all unit tests pass. The fix itself isn't checked on the box until installed. diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 393efc3..f072828 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 = 71 - versionName = "0.70.0-new-main-menu" + versionCode = 72 + versionName = "0.70.1-drive-in-card" } buildFeatures { compose = true } compileOptions { sourceCompatibility = JavaVersion.VERSION_17; targetCompatibility = JavaVersion.VERSION_17 } 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 2283ae1..66bd2f4 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.70.0\"") + connection.setRequestProperty("X-Emby-Authorization", "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.70.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/EmbyConnectionScreen.kt b/android/app/src/main/java/tv/orbit/classic/EmbyConnectionScreen.kt index 6b69578..6976bde 100644 --- a/android/app/src/main/java/tv/orbit/classic/EmbyConnectionScreen.kt +++ b/android/app/src/main/java/tv/orbit/classic/EmbyConnectionScreen.kt @@ -246,6 +246,10 @@ internal fun EmbyConnectionScreen(modifier: Modifier = Modifier, visible: Boolea // Keeps smart channels topped up in the background. A failure changes nothing on air. LaunchedEffect(session, extraChannels, channel, afterDarkChannel, toonamiChannel) { val active = session ?: return@LaunchedEffect + // What's booked shows straight away. The rounds below take a while with this many channels. + try { driveInPlan = withContext(Dispatchers.IO) { scheduleStore.loadPlan(active.accountId, DRIVE_IN_NUMBER) } } + catch (cancelled: CancellationException) { throw cancelled } + catch (_: Exception) { /* The round below tries again. */ } while (true) { for (programming in SmartChannels) { val loop = smartLoop(programming) ?: continue diff --git a/android/app/src/main/java/tv/orbit/classic/HomeScreen.kt b/android/app/src/main/java/tv/orbit/classic/HomeScreen.kt index b2a6199..c1387cd 100644 --- a/android/app/src/main/java/tv/orbit/classic/HomeScreen.kt +++ b/android/app/src/main/java/tv/orbit/classic/HomeScreen.kt @@ -115,7 +115,7 @@ private fun DriveInCard(session: EmbySampleSession, plan: ChannelPlan?, now: Lon } coming.drop(1).take(2).forEach { bill -> Row(Modifier.fillMaxWidth().padding(horizontal = 7.dp), horizontalArrangement = Arrangement.spacedBy(6.dp)) { - Text("${driveInDay(bill, now).take(3)} ${clock(bill.startMs)}", color = if (focused) Navy else Color(0xFFF2C14E), fontSize = 11.sp, fontWeight = FontWeight.SemiBold, maxLines = 1) + Text("${driveInDay(bill, now).let { if (it == "Tonight" || it == "Tomorrow") it else it.take(3) }} ${clock(bill.startMs)}", color = if (focused) Navy else Color(0xFFF2C14E), fontSize = 11.sp, fontWeight = FontWeight.SemiBold, maxLines = 1) Text(bill.title, color = if (focused) Navy else Color.White, fontSize = 11.sp, maxLines = 1, overflow = TextOverflow.Ellipsis) } } 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 2df4935..5ab6359 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.70.0") + next.setRequestProperty("User-Agent", "OrbitTV/0.70.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()) {