diff options
| author | JQ <81431263+scampower3@users.noreply.github.com> | 2025-03-27 10:26:47 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-26 20:26:47 -0600 |
| commit | d06ce1f1e035d4630121f45dcadbdebc95cb07e2 (patch) | |
| tree | 231b0acda3903f266acdca4a42eaaaf6a18af0b2 /Emby.Server.Implementations/Library/UserViewManager.cs | |
| parent | cafb7cd002e4214643dcdb5e5592d6c5a811ca1c (diff) | |
Fix only returning one item from /Item/Latest api. (#12492)
* Updated to EFcore
* Remove unused using
* Dont use DateCreated not from episode type or music type
* use TranslateQuery to filter out instead and then do the grouping and retrival of min and max datecreated instead
* Album also
Diffstat (limited to 'Emby.Server.Implementations/Library/UserViewManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/UserViewManager.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs index 5a9315a92..87214c273 100644 --- a/Emby.Server.Implementations/Library/UserViewManager.cs +++ b/Emby.Server.Implementations/Library/UserViewManager.cs @@ -372,6 +372,21 @@ namespace Emby.Server.Implementations.Library MediaTypes = mediaTypes }; + if (request.GroupItems) + { + if (parents.OfType<ICollectionFolder>().All(i => i.CollectionType == CollectionType.tvshows)) + { + query.Limit = limit; + return _libraryManager.GetLatestItemList(query, parents, CollectionType.tvshows); + } + + if (parents.OfType<ICollectionFolder>().All(i => i.CollectionType == CollectionType.music)) + { + query.Limit = limit; + return _libraryManager.GetLatestItemList(query, parents, CollectionType.music); + } + } + return _libraryManager.GetItemList(query, parents); } } |
