A few more UI tweaks (#603)

## Description
- Use series poster for seasons without a poster
- Larger logo on playback overlay
- Fix an issue where corner text on card on the home page would not
properly update

### Related issues
Closes #590
Closes #601
Fixes
https://github.com/damontecres/Wholphin/pull/586#issuecomment-3698613927
This commit is contained in:
Ray 2025-12-30 18:39:48 -05:00 committed by GitHub
parent e3fa45d12f
commit a5a7ed97b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 19 additions and 8 deletions

View file

@ -28,6 +28,7 @@ class ImageUrlService
itemType: BaseItemKind, itemType: BaseItemKind,
seriesId: UUID?, seriesId: UUID?,
useSeriesForPrimary: Boolean, useSeriesForPrimary: Boolean,
imageTags: Map<ImageType, String?>,
imageType: ImageType, imageType: ImageType,
fillWidth: Int? = null, fillWidth: Int? = null,
fillHeight: Int? = null, fillHeight: Int? = null,
@ -66,6 +67,13 @@ class ImageUrlService
fillWidth = fillWidth, fillWidth = fillWidth,
fillHeight = fillHeight, fillHeight = fillHeight,
) )
} else if (seriesId != null && itemType == BaseItemKind.SEASON && imageType !in imageTags) {
getItemImageUrl(
itemId = seriesId,
imageType = imageType,
fillWidth = fillWidth,
fillHeight = fillHeight,
)
} else { } else {
getItemImageUrl( getItemImageUrl(
itemId = itemId, itemId = itemId,
@ -98,6 +106,7 @@ class ImageUrlService
itemType = item.type, itemType = item.type,
seriesId = item.data.seriesId, seriesId = item.data.seriesId,
useSeriesForPrimary = item.useSeriesForPrimary, useSeriesForPrimary = item.useSeriesForPrimary,
imageTags = item.data.imageTags.orEmpty(),
imageType = imageType, imageType = imageType,
fillWidth = fillWidth, fillWidth = fillWidth,
fillHeight = fillHeight, fillHeight = fillHeight,

View file

@ -136,11 +136,12 @@ class GenreViewModel
// excludeItemIds.add(item.id) // excludeItemIds.add(item.id)
genreToUrl[genre.id] = genreToUrl[genre.id] =
imageUrlService.getItemImageUrl( imageUrlService.getItemImageUrl(
item.id, itemId = item.id,
item.type, itemType = item.type,
null, seriesId = null,
false, useSeriesForPrimary = false,
ImageType.BACKDROP, imageType = ImageType.BACKDROP,
imageTags = emptyMap(),
fillWidth = cardWidthPx, fillWidth = cardWidthPx,
) )
} }

View file

@ -345,7 +345,7 @@ fun HomePageContent(
.animateItem(), .animateItem(),
cardContent = { index, item, cardModifier, onClick, onLongClick -> cardContent = { index, item, cardModifier, onClick, onLongClick ->
val cornerText = val cornerText =
remember { remember(item) {
item?.data?.indexNumber?.let { "E$it" } item?.data?.indexNumber?.let { "E$it" }
?: item ?: item
?.data ?.data

View file

@ -19,7 +19,7 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.sizeIn import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyRow import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.lazy.itemsIndexed import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
@ -457,9 +457,10 @@ fun PlaybackOverlay(
AsyncImage( AsyncImage(
model = logoImageUrl, model = logoImageUrl,
contentDescription = "Logo", contentDescription = "Logo",
alignment = Alignment.TopStart,
modifier = modifier =
Modifier Modifier
.sizeIn(maxWidth = 180.dp, maxHeight = 100.dp) .size(width = 240.dp, height = 120.dp)
.padding(16.dp), .padding(16.dp),
) )
} }