Changed `GetThemeMedia` to support SortBy/Order options
Changes
The GetThemeMedia, GetThemeVideosandGetThemeSongs` functions can optionally sort the results based based on passing an ItemSortBy type and a SortOrder.
This is intended to be used by jellyfin-web in order to allow users to control the order of theme playback. See PR: https://github.com/jellyfin/jellyfin-web/pull/5714
Issues
Relates to feature request: https://features.jellyfin.org/posts/2740/select-audio-from-the-theme-music-folder-at-random
There is a soft dependendcy on #12165 , which improves the random distribution of items when using the "Random" ItemSortBy type.
Changes in OpenAPI specification found. Expand to see details.
What's Changed
GET /Items/{itemId}/ThemeSongs
Parameters:
Added: sortBy in query
Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.
Added: sortOrder in query
Optional. Sort Order - Ascending, Descending.
GET /Items/{itemId}/ThemeVideos
Parameters:
Added: sortBy in query
Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.
Added: sortOrder in query
Optional. Sort Order - Ascending, Descending.
GET /Items/{itemId}/ThemeMedia
Parameters:
Added: sortBy in query
Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.
Added: sortOrder in query
Optional. Sort Order - Ascending, Descending.