mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-11-06 02:40:58 +01:00
Fix music artist listing & show music in collections (#1739)
## Description Switches to use the Artists API instead of Items API when fetching the list of artists in a library. Enables fetching artists, albums, and music videos in a collection. Also adds titles for the remaining `BaseItemKind` types for future proofing even if they aren't used anywhere in the app. ### Related issues Fixes #1733 Fixes #1734 Fixes #1735 ### Testing Emulator, created a new collection with the above. Also verified the artist query against the web UI ## Screenshots N/A ## AI or LLM usage None
This commit is contained in:
parent
00490b14ec
commit
5bc874a9ff
9 changed files with 134 additions and 35 deletions
|
|
@ -9,6 +9,7 @@ import kotlinx.serialization.Serializable
|
|||
import kotlinx.serialization.UseSerializers
|
||||
import org.jellyfin.sdk.model.api.BaseItemKind
|
||||
import org.jellyfin.sdk.model.api.VideoType
|
||||
import org.jellyfin.sdk.model.api.request.GetArtistsRequest
|
||||
import org.jellyfin.sdk.model.api.request.GetItemsRequest
|
||||
import org.jellyfin.sdk.model.api.request.GetPersonsRequest
|
||||
import org.jellyfin.sdk.model.serializer.UUIDSerializer
|
||||
|
|
@ -138,6 +139,22 @@ data class GetItemsFilter(
|
|||
isFavorite = favorite,
|
||||
)
|
||||
|
||||
fun applyTo(req: GetArtistsRequest) =
|
||||
req.copy(
|
||||
minCommunityRating = minCommunityRating,
|
||||
isFavorite = favorite,
|
||||
genreIds = genres,
|
||||
personIds = persons,
|
||||
studioIds = studios,
|
||||
tags = tags,
|
||||
officialRatings = officialRatings,
|
||||
years =
|
||||
buildSet {
|
||||
years?.letNotEmpty(::addAll)
|
||||
decades?.forEach { addAll(it..<(it + 10)) }
|
||||
},
|
||||
)
|
||||
|
||||
/**
|
||||
* Merge another [GetItemsFilter] onto this one, replacing only unset values
|
||||
*/
|
||||
|
|
@ -162,4 +179,5 @@ data class GetItemsFilter(
|
|||
enum class GetItemsFilterOverride {
|
||||
NONE,
|
||||
PERSON,
|
||||
ARTIST,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue