Add more sort options to different types (#1488)

## Description
Adds more sorting options, notably premier date & ratings, to different
media types.

### Related issues
Closes #1417
Closes #1429
Replaces #1420

### Testing
Emulator on movie genre's items and music video libraries

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-05-30 16:56:33 -04:00 • committed by GitHub
parent 81e5f31401
commit 273a6138c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 63 additions and 0 deletions

View file

@ -24,6 +24,7 @@ import kotlinx.serialization.Transient
import org.jellyfin.sdk.api.client.ApiClient
import org.jellyfin.sdk.model.api.BaseItemDto
import org.jellyfin.sdk.model.api.BaseItemKind
import org.jellyfin.sdk.model.api.CollectionType
import org.jellyfin.sdk.model.extensions.ticks
import java.util.Locale
import java.util.UUID
@ -283,6 +284,7 @@ fun createGenreDestination(
parentId: UUID,
parentName: String?,
includeItemTypes: List<BaseItemKind>?,
collectionType: CollectionType,
) = Destination.FilteredCollection(
itemId = parentId,
parentType = BaseItemKind.GENRE,
@ -301,6 +303,7 @@ fun createGenreDestination(
useSavedLibraryDisplayInfo = false,
),
recursive = true,
collectionType = collectionType,
)
fun createStudioDestination(
@ -327,6 +330,7 @@ fun createStudioDestination(
useSavedLibraryDisplayInfo = false,
),
recursive = true,
collectionType = CollectionType.UNKNOWN,
)
val BaseItem.studioNames get() = data.studios?.mapNotNull { it.name }.orEmpty()