Level the main menu columns and write upcoming bills in full (0.70.2)
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 1m45s
pauljd/davidson-ci: Davidson CI / ai-review (push) Failing after 1m33s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-11-02 12:46:20 +00:00
co-authored by Claude Opus 5.5
parent 12bd4590b4
commit e4105eebeb
5 changed files with 13 additions and 11 deletions
+5
View File
@@ -0,0 +1,5 @@
# Orbit TV 0.70.2: level columns
The main menu's three columns now end level at the bottom: category and On now rows share out the height. The Drive-In card's upcoming lines read "Tonight at 23:00 - Misery", as Paul asked. Long titles are cut with an ellipsis.
Checked: build, lint and all unit tests pass. Not checked on the box until installed.
+2 -2
View File
@@ -9,8 +9,8 @@ android {
applicationId = "tv.orbit.classic"
minSdk = 26
targetSdk = 36
versionCode = 72
versionName = "0.70.1-drive-in-card"
versionCode = 73
versionName = "0.70.2-level-columns"
}
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.1\"")
connection.setRequestProperty("X-Emby-Authorization", "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.70.2\"")
request.token?.let { connection.setRequestProperty("X-Emby-Token", it) }
if (request.method == "POST") {
val bytes = request.body.orEmpty().toByteArray(Charsets.UTF_8)
@@ -114,10 +114,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).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)
}
Text("${driveInDay(bill, now)} at ${clock(bill.startMs)} - ${bill.title}", Modifier.padding(horizontal = 7.dp), color = if (focused) Navy else Color.White, fontSize = 11.sp, fontWeight = FontWeight.SemiBold, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
}
@@ -133,9 +130,9 @@ internal fun HomeScreen(session: EmbySampleSession, channels: List<SampleChannel
LaunchedEffect(Unit) { firstFocus.requestFocus() }
Column(modifier.fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(8.dp)) {
Row(Modifier.fillMaxWidth().weight(1f), horizontalArrangement = Arrangement.spacedBy(14.dp)) {
Column(Modifier.width(176.dp), verticalArrangement = Arrangement.spacedBy(6.dp)) {
Column(Modifier.width(176.dp).fillMaxHeight(), verticalArrangement = Arrangement.spacedBy(6.dp)) {
homeCategories(channels.map { it.number }).forEachIndexed { index, category ->
HomeCard(Modifier.fillMaxWidth().height(46.dp), if (index == 0) firstFocus else null, onClick = { onCategory(category) }) { focused ->
HomeCard(Modifier.fillMaxWidth().weight(1f), if (index == 0) firstFocus else null, onClick = { onCategory(category) }) { focused ->
Row(Modifier.fillMaxSize().padding(horizontal = 10.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp)) {
Image(painterResource(category.icon), null, Modifier.size(26.dp), colorFilter = if (focused) ColorFilter.tint(Navy) else null)
Text(category.label, color = if (focused) Navy else Color.White, fontSize = 15.sp, fontWeight = FontWeight.SemiBold, maxLines = 1)
@@ -156,7 +153,7 @@ internal fun HomeScreen(session: EmbySampleSession, channels: List<SampleChannel
others.forEach { line ->
val show = line.at(now)
val mark = ChannelBrands.forNumber(line.number)
HomeCard(Modifier.fillMaxWidth().height(46.dp), onClick = { onWatch(line.number) }) { focused ->
HomeCard(Modifier.fillMaxWidth().weight(1f), onClick = { onWatch(line.number) }) { focused ->
Row(Modifier.fillMaxSize().padding(horizontal = 8.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
if (mark != null) Image(painterResource(mark.logo), mark.displayName, Modifier.width(84.dp).height(28.dp))
else Text(ChannelBrands.displayName(line), Modifier.width(84.dp), color = if (focused) Navy else Color.White, fontSize = 12.sp, maxLines = 1)
@@ -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.1")
next.setRequestProperty("User-Agent", "OrbitTV/0.70.2")
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()) {