diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-09-17 21:51:22 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-09-17 21:51:22 -0400 |
| commit | 2acd1665c9b2d6fb087e131805f881d2f596f5c4 (patch) | |
| tree | 4fff6b1221dc990f0a5f5e2af55f5de223587c21 /MediaBrowser.Server.Implementations/LiveTv/Listings | |
| parent | 8a4f86aefe3f2770f794b063b29e492c896e80fc (diff) | |
update series timers
Diffstat (limited to 'MediaBrowser.Server.Implementations/LiveTv/Listings')
| -rw-r--r-- | MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index b96aa52264..868889ba7d 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -237,8 +237,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings ScheduleDirect.ProgramDetails details) { //_logger.Debug("Show type is: " + (details.showType ?? "No ShowType")); - DateTime startAt = DateTime.ParseExact(programInfo.airDateTime, "yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'", - CultureInfo.InvariantCulture); + DateTime startAt = GetDate(programInfo.airDateTime); DateTime endAt = startAt.AddSeconds(programInfo.duration); ProgramAudio audioType = ProgramAudio.Stereo; @@ -361,6 +360,17 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings return info; } + private DateTime GetDate(string value) + { + var date = DateTime.ParseExact(value, "yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'", CultureInfo.InvariantCulture); + + if (date.Kind != DateTimeKind.Utc) + { + date = DateTime.SpecifyKind(date, DateTimeKind.Utc); + } + return date; + } + private string GetProgramLogo(string apiUrl, ScheduleDirect.ShowImages images) { string url = ""; @@ -400,7 +410,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings { imageIdString += "\"" + i.Substring(0, 10) + "\","; } - ; }); imageIdString = imageIdString.TrimEnd(',') + "]"; |
