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:
damontecres 2025-10-16 16:49:40 -04:00 committed by GitHub
parent 6a896cf600
commit 0e195c18d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 330 additions and 57 deletions

View file

@ -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,
)
}