mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 16:11:20 +02:00
Better images for genre grid (#501)
## Description Overhauls the genre cards for Movies & TV Show libraries. Now the cards use a semi-transparent, consistent, generated color using the same logic as in #478. And a random item from the library with that genre is show in the background. This is heavily inspired from Plex. If there are not applicable items for the genre, then just the colored card is shown. ### Related issues Fixes #490
This commit is contained in:
parent
e60748a0d0
commit
693398536e
6 changed files with 252 additions and 24 deletions
|
|
@ -1,8 +1,10 @@
|
|||
package com.github.damontecres.wholphin.data.model
|
||||
|
||||
import com.github.damontecres.wholphin.ui.detail.CardGridItem
|
||||
import com.github.damontecres.wholphin.ui.detail.series.SeasonEpisodeIds
|
||||
import com.github.damontecres.wholphin.ui.formatDateTime
|
||||
import com.github.damontecres.wholphin.ui.nav.Destination
|
||||
import com.github.damontecres.wholphin.ui.playback.playable
|
||||
import com.github.damontecres.wholphin.ui.seasonEpisode
|
||||
import com.github.damontecres.wholphin.ui.seasonEpisodePadded
|
||||
import com.github.damontecres.wholphin.ui.seriesProductionYears
|
||||
|
|
@ -18,8 +20,14 @@ import kotlin.time.Duration
|
|||
data class BaseItem(
|
||||
val data: BaseItemDto,
|
||||
val useSeriesForPrimary: Boolean,
|
||||
) {
|
||||
val id get() = data.id
|
||||
) : CardGridItem {
|
||||
override val id get() = data.id
|
||||
|
||||
override val playable: Boolean
|
||||
get() = type.playable
|
||||
|
||||
override val sortName: String
|
||||
get() = data.sortName ?: data.name ?: ""
|
||||
|
||||
val type get() = data.type
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue