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

View file

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

View file

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

View file

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