mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-25 06:58:40 +02:00
Merge pull request #3563 from cvium/fix_next_up
Only fetch Next Up for episodes that have been fully matched
This commit is contained in:
commit
55dafd4149
|
@ -117,23 +117,20 @@ namespace Emby.Server.Implementations.TV
|
||||||
limit = limit.Value + 10;
|
limit = limit.Value + 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
var items = _libraryManager.GetItemList(new InternalItemsQuery(user)
|
var items = _libraryManager
|
||||||
|
.GetItemList(
|
||||||
|
new InternalItemsQuery(user)
|
||||||
{
|
{
|
||||||
IncludeItemTypes = new[] { typeof(Episode).Name },
|
IncludeItemTypes = new[] { typeof(Episode).Name },
|
||||||
OrderBy = new[] { new ValueTuple<string, SortOrder>(ItemSortBy.DatePlayed, SortOrder.Descending) },
|
OrderBy = new[] { new ValueTuple<string, SortOrder>(ItemSortBy.DatePlayed, SortOrder.Descending) },
|
||||||
SeriesPresentationUniqueKey = presentationUniqueKey,
|
SeriesPresentationUniqueKey = presentationUniqueKey,
|
||||||
Limit = limit,
|
Limit = limit,
|
||||||
DtoOptions = new DtoOptions
|
DtoOptions = new DtoOptions { Fields = new[] { ItemFields.SeriesPresentationUniqueKey }, EnableImages = false },
|
||||||
{
|
|
||||||
Fields = new ItemFields[]
|
|
||||||
{
|
|
||||||
ItemFields.SeriesPresentationUniqueKey
|
|
||||||
},
|
|
||||||
EnableImages = false
|
|
||||||
},
|
|
||||||
GroupBySeriesPresentationUniqueKey = true
|
GroupBySeriesPresentationUniqueKey = true
|
||||||
|
}, parentsFolders.ToList())
|
||||||
}, parentsFolders.ToList()).Cast<Episode>().Select(GetUniqueSeriesKey);
|
.Cast<Episode>()
|
||||||
|
.Where(episode => !string.IsNullOrEmpty(episode.SeriesPresentationUniqueKey))
|
||||||
|
.Select(GetUniqueSeriesKey);
|
||||||
|
|
||||||
// Avoid implicitly captured closure
|
// Avoid implicitly captured closure
|
||||||
var episodes = GetNextUpEpisodes(request, user, items, dtoOptions);
|
var episodes = GetNextUpEpisodes(request, user, items, dtoOptions);
|
||||||
|
|
Loading…
Reference in a new issue