Skip to content

Commit

Permalink
Add correct tag to logo.
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenzeller committed Jun 18, 2024
1 parent 8960dad commit 2e876ef
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,22 @@ private suspend fun getRandomLibraryShowcase(

Timber.i("Loading random library showcase item ${item.id}")

val tag = item.backdropImageTags!!.randomOrNull()
val backdropTag = item.backdropImageTags!!.randomOrNull()
?: item.imageTags?.get(ImageType.BACKDROP)

val logoTag = item.imageTags?.get(ImageType.LOGO)

val backdropUrl = api.imageApi.getItemImageUrl(
itemId = item.id,
imageType = ImageType.BACKDROP,
tag = tag,
tag = backdropTag,
format = ImageFormat.WEBP,
)

val logoUrl = api.imageApi.getItemImageUrl(
itemId = item.id,
imageType = ImageType.LOGO,
tag = tag,
tag = logoTag,
format = ImageFormat.WEBP,
)

Expand Down

0 comments on commit 2e876ef

Please sign in to comment.