From ea6a751e7257e689e49b4e8079ade16294e87b8b Mon Sep 17 00:00:00 2001 From: beyond Date: Sun, 6 Sep 2026 18:15:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=AD=E6=94=BE=E5=99=A8:=20=E6=97=A0logo?= =?UTF-8?q?=E6=97=B6=E6=98=BE=E7=A4=BA=E5=89=A7=E5=90=8D=E8=80=8C=E9=9D=9E?= =?UTF-8?q?=E9=9B=86=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - VideoPlayerScreen新增seriesName参数 - 无logo图片时显示seriesName(剧名)而非title(集名) - AppNavHost传递target.seriesName给播放器 Co-Authored-By: Claude Opus 5 (1M context) --- .../kotlin/com/example/myapplication/navigation/AppNavHost.kt | 1 + .../com/example/myapplication/screens/VideoPlayerScreen.kt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/example/myapplication/navigation/AppNavHost.kt b/app/src/main/kotlin/com/example/myapplication/navigation/AppNavHost.kt index 3e0a99d..8843484 100644 --- a/app/src/main/kotlin/com/example/myapplication/navigation/AppNavHost.kt +++ b/app/src/main/kotlin/com/example/myapplication/navigation/AppNavHost.kt @@ -485,6 +485,7 @@ private fun PlayerDestination( when { target != null -> VideoPlayerScreen( title = target.name, + seriesName = target.seriesName.orEmpty(), titleLogoUrl = target.getLogoUrl(server?.fullUrl.orEmpty()).orEmpty(), serverName = server?.name.orEmpty(), serverIconUrl = server?.iconUrl.orEmpty(), diff --git a/app/src/main/kotlin/com/example/myapplication/screens/VideoPlayerScreen.kt b/app/src/main/kotlin/com/example/myapplication/screens/VideoPlayerScreen.kt index 757be8b..166efe0 100644 --- a/app/src/main/kotlin/com/example/myapplication/screens/VideoPlayerScreen.kt +++ b/app/src/main/kotlin/com/example/myapplication/screens/VideoPlayerScreen.kt @@ -266,6 +266,7 @@ private tailrec fun Context.findActivity(): Activity? = when (this) { @Composable fun VideoPlayerScreen( title: String, + seriesName: String = "", titleLogoUrl: String = "", serverName: String = "", serverIconUrl: String = "", @@ -934,7 +935,7 @@ fun VideoPlayerScreen( modifier = Modifier.height(28.dp).widthIn(max = 220.dp), ) } else { - Text(title, color = Color.White, fontSize = 18.sp, fontWeight = FontWeight.Bold, maxLines = 1, overflow = TextOverflow.Ellipsis) + Text(seriesName.ifBlank { title }, color = Color.White, fontSize = 18.sp, fontWeight = FontWeight.Bold, maxLines = 1, overflow = TextOverflow.Ellipsis) } } Row(horizontalArrangement = Arrangement.spacedBy(12.dp), verticalAlignment = Alignment.CenterVertically) {