mirror of
https://github.com/jellyfin/jellyfin-androidtv.git
synced 2024-11-30 17:40:25 +00:00
Add fallback image to LeanbackChannelWorker
This commit is contained in:
parent
ffa6f1f9fb
commit
00b24be8cc
@ -25,6 +25,7 @@ import org.jellyfin.androidtv.data.repository.UserViewsRepository
|
||||
import org.jellyfin.androidtv.integration.provider.ImageProvider
|
||||
import org.jellyfin.androidtv.preference.UserPreferences
|
||||
import org.jellyfin.androidtv.ui.startup.StartupActivity
|
||||
import org.jellyfin.androidtv.util.ImageUtils
|
||||
import org.jellyfin.androidtv.util.dp
|
||||
import org.jellyfin.androidtv.util.sdk.isUsable
|
||||
import org.jellyfin.sdk.api.client.ApiClient
|
||||
@ -246,7 +247,7 @@ class LeanbackChannelWorker(
|
||||
tag = imageTags?.get(ImageType.THUMB),
|
||||
)
|
||||
|
||||
else -> api.imageApi.getItemImageUrl(
|
||||
imageTags?.containsKey(ImageType.PRIMARY) == true -> api.imageApi.getItemImageUrl(
|
||||
itemId = id,
|
||||
imageType = ImageType.PRIMARY,
|
||||
format = ImageFormat.WEBP,
|
||||
@ -254,6 +255,8 @@ class LeanbackChannelWorker(
|
||||
height = 153.dp(context),
|
||||
tag = imageTags?.get(ImageType.PRIMARY),
|
||||
)
|
||||
|
||||
else -> ImageUtils.getResourceUrl(context, R.drawable.tile_land_tv)
|
||||
}.let(ImageProvider::getImageUri)
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user