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

@@ -565,6 +565,15 @@ namespace MediaBrowser.Controller.Library
/// <returns>List of items.</returns>
IReadOnlyList<BaseItem> GetItemList(InternalItemsQuery query, List<BaseItem> parents);
/// <summary>
/// Gets the list of series presentation keys for next up.
/// </summary>
/// <param name="query">The query to use.</param>
/// <param name="parents">Items to use for query.</param>
/// <param name="dateCutoff">The minimum date for a series to have been most recently watched.</param>
/// <returns>List of series presentation keys.</returns>
IReadOnlyList<string> GetNextUpSeriesKeys(InternalItemsQuery query, IReadOnlyCollection<BaseItem> parents, DateTime dateCutoff);
/// <summary>
/// Gets the items result.
/// </summary>

View File

@@ -59,6 +59,14 @@ public interface IItemRepository
/// <returns>List&lt;BaseItem&gt;.</returns>
IReadOnlyList<BaseItem> GetItemList(InternalItemsQuery filter);
/// <summary>
/// Gets the list of series presentation keys for next up.
/// </summary>
/// <param name="filter">The query.</param>
/// <param name="dateCutoff">The minimum date for a series to have been most recently watched.</param>
/// <returns>The list of keys.</returns>
IReadOnlyList<string> GetNextUpSeriesKeys(InternalItemsQuery filter, DateTime dateCutoff);
/// <summary>
/// Updates the inherited values.
/// </summary>