Merge pull request #4595 from MrTimscampi/clean-next-up
Don't return first episodes in next up
This commit is contained in:
commit
5dc61f066d
|
@ -146,28 +146,10 @@ namespace Emby.Server.Implementations.TV
|
|||
var allNextUp = seriesKeys
|
||||
.Select(i => GetNextUp(i, currentUser, dtoOptions));
|
||||
|
||||
// allNextUp = allNextUp.OrderByDescending(i => i.Item1);
|
||||
|
||||
// If viewing all next up for all series, remove first episodes
|
||||
// But if that returns empty, keep those first episodes (avoid completely empty view)
|
||||
var alwaysEnableFirstEpisode = !string.IsNullOrEmpty(request.SeriesId);
|
||||
var anyFound = false;
|
||||
|
||||
return allNextUp
|
||||
.Where(i =>
|
||||
{
|
||||
if (alwaysEnableFirstEpisode || i.Item1 != DateTime.MinValue)
|
||||
{
|
||||
anyFound = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!anyFound && i.Item1 == DateTime.MinValue)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return i.Item1 != DateTime.MinValue;
|
||||
})
|
||||
.Select(i => i.Item2())
|
||||
.Where(i => i != null);
|
||||
|
|
Loading…
Reference in New Issue
Block a user