mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-09 15:20:34 +02:00
update next up limit
This commit is contained in:
parent
2bfd6d3be0
commit
e50fbdfafc
|
@ -50,6 +50,11 @@ namespace MediaBrowser.Server.Implementations.TV
|
|||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(presentationUniqueKey) && limit.HasValue)
|
||||
{
|
||||
limit = limit.Value + 10;
|
||||
}
|
||||
|
||||
var items = _libraryManager.GetItemList(new InternalItemsQuery(user)
|
||||
{
|
||||
IncludeItemTypes = new[] { typeof(Series).Name },
|
||||
|
@ -89,6 +94,11 @@ namespace MediaBrowser.Server.Implementations.TV
|
|||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(presentationUniqueKey) && limit.HasValue)
|
||||
{
|
||||
limit = limit.Value + 10;
|
||||
}
|
||||
|
||||
var items = _libraryManager.GetItemList(new InternalItemsQuery(user)
|
||||
{
|
||||
IncludeItemTypes = new[] { typeof(Series).Name },
|
||||
|
@ -115,7 +125,8 @@ namespace MediaBrowser.Server.Implementations.TV
|
|||
.Where(i => i.Item1 != null && (!i.Item3 || !string.IsNullOrWhiteSpace(request.SeriesId)))
|
||||
.OrderByDescending(i => i.Item2)
|
||||
.ThenByDescending(i => i.Item1.PremiereDate ?? DateTime.MinValue)
|
||||
.Select(i => i.Item1);
|
||||
.Select(i => i.Item1)
|
||||
.Take(request.Limit ?? int.MaxValue);
|
||||
}
|
||||
|
||||
private string GetUniqueSeriesKey(BaseItem series)
|
||||
|
|
Loading…
Reference in a new issue