aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/TV/Episode.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Entities/TV/Episode.cs')
-rw-r--r--MediaBrowser.Controller/Entities/TV/Episode.cs21
1 files changed, 20 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs
index 14c6554556..96b120b8fe 100644
--- a/MediaBrowser.Controller/Entities/TV/Episode.cs
+++ b/MediaBrowser.Controller/Entities/TV/Episode.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
@@ -191,5 +192,23 @@ 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 PremiereDate.HasValue && PremiereDate.Value.ToLocalTime().Date >= DateTime.Now.Date; }
+ }
+
+ public bool IsVirtualUnaired
+ {
+ get { return LocationType == Model.Entities.LocationType.Virtual && IsUnaired; }
+ }
}
}