Show the Drive-In card straight away, with whole day names (0.70.1)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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.
|
||||
@@ -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 }
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user