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
This commit is contained in:
Cody Robibero
2025-03-18 17:37:04 -06:00
committed by GitHub
parent e1392ca1b6
commit 85b5bebda4
7 changed files with 136 additions and 121 deletions

View File

@@ -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)