mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 03:48:06 +02:00
update next up limit
This commit is contained in:
parent
2bfd6d3be0
commit
e50fbdfafc
1 changed files with 12 additions and 1 deletions
|
@ -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)
|
var items = _libraryManager.GetItemList(new InternalItemsQuery(user)
|
||||||
{
|
{
|
||||||
IncludeItemTypes = new[] { typeof(Series).Name },
|
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)
|
var items = _libraryManager.GetItemList(new InternalItemsQuery(user)
|
||||||
{
|
{
|
||||||
IncludeItemTypes = new[] { typeof(Series).Name },
|
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)))
|
.Where(i => i.Item1 != null && (!i.Item3 || !string.IsNullOrWhiteSpace(request.SeriesId)))
|
||||||
.OrderByDescending(i => i.Item2)
|
.OrderByDescending(i => i.Item2)
|
||||||
.ThenByDescending(i => i.Item1.PremiereDate ?? DateTime.MinValue)
|
.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)
|
private string GetUniqueSeriesKey(BaseItem series)
|
||||||
|
|
Loading…
Reference in a new issue