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 /MediaBrowser.Controller | |
| 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 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Library/ILibraryManager.cs | 9 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Persistence/IItemRepository.cs | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index 47b1cb16e..03a28fd8c 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -566,6 +566,15 @@ namespace MediaBrowser.Controller.Library 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> /// <param name="query">The query.</param> diff --git a/MediaBrowser.Controller/Persistence/IItemRepository.cs b/MediaBrowser.Controller/Persistence/IItemRepository.cs index afe2d833d..f1ed4fe27 100644 --- a/MediaBrowser.Controller/Persistence/IItemRepository.cs +++ b/MediaBrowser.Controller/Persistence/IItemRepository.cs @@ -60,6 +60,14 @@ public interface IItemRepository 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> void UpdateInheritedValues(); |
