diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-01-12 10:58:47 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-01-12 10:58:47 -0500 |
| commit | cc3e8dbbb942977d8f46a0a16e3802c0e5d0c94b (patch) | |
| tree | 85805a24d77ee67daf5edbadd090fa52f4d17fc0 /MediaBrowser.Controller/LiveTv/LiveTvProgram.cs | |
| parent | c8a106f485ff7e340ee8ca67adac3351ec6a31b6 (diff) | |
added suggested live tv page
Diffstat (limited to 'MediaBrowser.Controller/LiveTv/LiveTvProgram.cs')
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/LiveTvProgram.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs index abacc0c18e..aceb32885e 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs @@ -1,5 +1,6 @@ using MediaBrowser.Controller.Entities; using MediaBrowser.Model.LiveTv; +using System; namespace MediaBrowser.Controller.LiveTv { @@ -28,6 +29,26 @@ namespace MediaBrowser.Controller.LiveTv } } + public bool IsAiring + { + get + { + var now = DateTime.UtcNow; + + return now >= ProgramInfo.StartDate && now < ProgramInfo.EndDate; + } + } + + public bool HasAired + { + get + { + var now = DateTime.UtcNow; + + return now >= ProgramInfo.EndDate; + } + } + public override string GetClientTypeName() { return "Program"; |
