mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-04 06:48:35 +01:00
added new params for missing/unaired
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
@@ -191,5 +192,18 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsMissingEpisode
|
||||
{
|
||||
get
|
||||
{
|
||||
return LocationType == Model.Entities.LocationType.Virtual && PremiereDate.HasValue && PremiereDate.Value < DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsUnaired
|
||||
{
|
||||
get { return LocationType == Model.Entities.LocationType.Virtual && PremiereDate.HasValue && PremiereDate.Value >= DateTime.UtcNow; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Controller.Library;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Localization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -147,5 +148,20 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
{
|
||||
return IndexNumber != null ? IndexNumber.Value.ToString("0000") : Name;
|
||||
}
|
||||
|
||||
public bool IsMissingSeason
|
||||
{
|
||||
get { return LocationType == Model.Entities.LocationType.Virtual && Children.OfType<Episode>().All(i => i.IsMissingEpisode); }
|
||||
}
|
||||
|
||||
public bool IsUnaired
|
||||
{
|
||||
get { return LocationType == Model.Entities.LocationType.Virtual && Children.OfType<Episode>().All(i => i.IsUnaired); }
|
||||
}
|
||||
|
||||
public bool IsMissingOrUnaired
|
||||
{
|
||||
get { return LocationType == Model.Entities.LocationType.Virtual && Children.OfType<Episode>().All(i => i.IsUnaired || i.IsMissingEpisode); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user