mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 16:11:20 +02:00
Show genres tab for TV & Movies (#16)
Adds a tab to the TV Show & Movie screens which displays the genres in that library as a grid. You can select the genre to see the items in that library for the genre. This PR also adds backend changes for further filtering to implement #13.
This commit is contained in:
parent
6a896cf600
commit
0e195c18d7
13 changed files with 330 additions and 57 deletions
|
|
@ -0,0 +1,31 @@
|
|||
@file:UseSerializers(UuidSerializer::class)
|
||||
|
||||
package com.github.damontecres.wholphin.data.model
|
||||
|
||||
import com.github.damontecres.wholphin.util.UuidSerializer
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.UseSerializers
|
||||
import org.jellyfin.sdk.model.api.request.GetItemsRequest
|
||||
import java.util.UUID
|
||||
|
||||
@Serializable
|
||||
data class GetItemsFilter(
|
||||
val favorite: Boolean? = null,
|
||||
val genres: List<UUID>? = null,
|
||||
val minCriticRating: Double? = null,
|
||||
val persons: List<UUID>? = null,
|
||||
val played: Boolean? = null,
|
||||
val studios: List<UUID>? = null,
|
||||
val tags: List<String>? = null,
|
||||
) {
|
||||
fun applyTo(req: GetItemsRequest) =
|
||||
req.copy(
|
||||
isFavorite = favorite,
|
||||
genreIds = genres,
|
||||
minCriticRating = minCriticRating,
|
||||
personIds = persons,
|
||||
isPlayed = played,
|
||||
studioIds = studios,
|
||||
tags = tags,
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue