播放器: 无logo时显示剧名而非集名
- VideoPlayerScreen新增seriesName参数 - 无logo图片时显示seriesName(剧名)而非title(集名) - AppNavHost传递target.seriesName给播放器 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
1 parent
0bb52f3ec8
commit
ea6a751e72
2 files changed
+3
-1
No files matched your search
@@ -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(),
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user