|
|
@ -117,23 +117,19 @@ 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 },
|
|
|
|
|
|
|
|
OrderBy = new[] { new ValueTuple<string, SortOrder>(ItemSortBy.DatePlayed, SortOrder.Descending) },
|
|
|
|
|
|
|
|
SeriesPresentationUniqueKey = presentationUniqueKey,
|
|
|
|
|
|
|
|
Limit = limit,
|
|
|
|
|
|
|
|
DtoOptions = new DtoOptions
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Fields = new ItemFields[]
|
|
|
|
IncludeItemTypes = new[] {typeof(Episode).Name},
|
|
|
|
{
|
|
|
|
OrderBy = new[] {new ValueTuple<string, SortOrder>(ItemSortBy.DatePlayed, SortOrder.Descending)},
|
|
|
|
ItemFields.SeriesPresentationUniqueKey
|
|
|
|
SeriesPresentationUniqueKey = presentationUniqueKey,
|
|
|
|
},
|
|
|
|
Limit = limit,
|
|
|
|
EnableImages = false
|
|
|
|
DtoOptions = new DtoOptions {Fields = new ItemFields[] {ItemFields.SeriesPresentationUniqueKey}, EnableImages = false},
|
|
|
|
},
|
|
|
|
GroupBySeriesPresentationUniqueKey = true
|
|
|
|
GroupBySeriesPresentationUniqueKey = true
|
|
|
|
}, parentsFolders.ToList())
|
|
|
|
|
|
|
|
.Cast<Episode>()
|
|
|
|
}, parentsFolders.ToList()).Cast<Episode>().Select(GetUniqueSeriesKey);
|
|
|
|
.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);
|
|
|
|