refactor: update image handling in Series dto to use imageUrlPrefix and JellyfinImageHelper

This commit is contained in:
2026-04-01 22:38:58 +02:00
parent ce5266f17c
commit 98850087ff
10 changed files with 25 additions and 21 deletions

View File

@@ -92,7 +92,7 @@ class SeriesScreenContentTest {
name = "Severance",
synopsis = "Mark leads a team of office workers whose memories have been surgically divided.",
year = "2022",
heroImageUrl = "https://images.unsplash.com/photo-1500530855697-b586d89ba3ee",
imageUrlPrefix = "https://images.unsplash.com/photo-1500530855697-b586d89ba3ee",
unwatchedEpisodeCount = 3,
seasonCount = 1,
seasons = listOf(
@@ -154,7 +154,7 @@ class SeriesScreenContentTest {
name = "Foundation",
synopsis = "A band of exiles works to preserve knowledge through the fall of an empire.",
year = "2021",
heroImageUrl = "https://images.unsplash.com/photo-1500530855697-b586d89ba3ee",
imageUrlPrefix = "https://images.unsplash.com/photo-1500530855697-b586d89ba3ee",
unwatchedEpisodeCount = 0,
seasonCount = 1,
seasons = listOf(

View File

@@ -18,11 +18,13 @@ import hu.bbara.purefin.common.ui.PurefinWaitingScreen
import hu.bbara.purefin.common.ui.components.MediaDetailOverviewSection
import hu.bbara.purefin.common.ui.components.MediaDetailSectionTitle
import hu.bbara.purefin.common.ui.components.TvMediaDetailScaffold
import hu.bbara.purefin.core.data.image.JellyfinImageHelper
import hu.bbara.purefin.core.data.navigation.SeriesDto
import hu.bbara.purefin.core.model.Season
import hu.bbara.purefin.core.model.Series
import hu.bbara.purefin.feature.shared.content.series.SeriesViewModel
import org.jellyfin.sdk.model.UUID
import org.jellyfin.sdk.model.api.ImageType
@Composable
fun SeriesScreen(
@@ -78,7 +80,7 @@ internal fun SeriesScreenContent(
}
TvMediaDetailScaffold(
heroImageUrl = series.heroImageUrl,
heroImageUrl = JellyfinImageHelper.finishImageUrl(series.imageUrlPrefix, ImageType.PRIMARY),
resetScrollKey = series.id,
modifier = modifier,
topBar = {