From 24f355a7790ff81359b0cb3bbe98329b6c516866 Mon Sep 17 00:00:00 2001 From: ItsAllAboutTheCode <52703+ItsAllAboutTheCode@users.noreply.github.com> Date: Sun, 21 Jul 2024 14:16:31 +0000 Subject: 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. --- MediaBrowser.Controller/Entities/UserViewBuilder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Controller/Entities/UserViewBuilder.cs') 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) -- cgit v1.2.3