diff options
| author | Cody Robibero <cody@robibe.ro> | 2025-03-18 17:37:04 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-18 17:37:04 -0600 |
| commit | 85b5bebda4a887bad03a114e727d9ee5d87961cc (patch) | |
| tree | d880ec88af19d1586b9c660e813a724823ce89e3 /Emby.Server.Implementations/Library/LibraryManager.cs | |
| parent | e1392ca1b62355d9ce16177b9f69d2bd56c1e0d0 (diff) | |
Add fast-path to getting just the SeriesPresentationUniqueKey for NextUp (#13687)
* Add more optimized query to calculate series that should be processed for next up
* Filter series based on last watched date
Diffstat (limited to 'Emby.Server.Implementations/Library/LibraryManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/LibraryManager.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index cc2092e21..7b3a54039 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -1344,6 +1344,21 @@ namespace Emby.Server.Implementations.Library return _itemRepository.GetItemList(query); } + public IReadOnlyList<string> GetNextUpSeriesKeys(InternalItemsQuery query, IReadOnlyCollection<BaseItem> parents, DateTime dateCutoff) + { + SetTopParentIdsOrAncestors(query, parents); + + if (query.AncestorIds.Length == 0 && query.TopParentIds.Length == 0) + { + if (query.User is not null) + { + AddUserToQuery(query, query.User); + } + } + + return _itemRepository.GetNextUpSeriesKeys(query, dateCutoff); + } + public QueryResult<BaseItem> QueryItems(InternalItemsQuery query) { if (query.User is not null) |
