diff options
| author | ItsAllAboutTheCode <52703+ItsAllAboutTheCode@users.noreply.github.com> | 2024-07-21 14:16:31 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-21 16:16:31 +0200 |
| commit | 24f355a7790ff81359b0cb3bbe98329b6c516866 (patch) | |
| tree | 4dc706e825426d441e19a75a696241f09ff28ce7 /MediaBrowser.Controller/Entities/UserViewBuilder.cs | |
| parent | d5cf0ad2c87f4bb7a5c0295b053695f623cae56b (diff) | |
Changed `GetThemeMedia` to support SortBy/Order options (#12167)
* Changed `GetThemeMedia` to support SortBy/Order options
The `GetThemeMedia, `GetThemeVideos` and `GetThemeSongs` 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
* Update MediaBrowser.Controller/Entities/BaseItem.cs
Fix the `GetThemeVideos` two argument overload having both parameters defaulted.
For the two argument overload, both parameters are required.
Diffstat (limited to 'MediaBrowser.Controller/Entities/UserViewBuilder.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/UserViewBuilder.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/Entities/UserViewBuilder.cs b/MediaBrowser.Controller/Entities/UserViewBuilder.cs index 4af000557..3a1d0c070 100644 --- a/MediaBrowser.Controller/Entities/UserViewBuilder.cs +++ b/MediaBrowser.Controller/Entities/UserViewBuilder.cs @@ -744,7 +744,7 @@ namespace MediaBrowser.Controller.Entities { var filterValue = query.HasThemeSong.Value; - var themeCount = item.GetThemeSongs().Count; + var themeCount = item.GetThemeSongs(user).Count; var ok = filterValue ? themeCount > 0 : themeCount == 0; if (!ok) @@ -757,7 +757,7 @@ namespace MediaBrowser.Controller.Entities { var filterValue = query.HasThemeVideo.Value; - var themeCount = item.GetThemeVideos().Count; + var themeCount = item.GetThemeVideos(user).Count; var ok = filterValue ? themeCount > 0 : themeCount == 0; if (!ok) |
