mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-11-06 02:40:58 +01:00
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:
parent
81e5f31401
commit
273a6138c6
10 changed files with 63 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue