diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-06-28 00:47:30 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-06-28 00:47:30 -0400 |
| commit | bbdd2c5f6a1ce4640d3e11e158c3630f701419c2 (patch) | |
| tree | 844cd094bbdb96533574d5a0217061a3e004a8af /MediaBrowser.Server.Implementations/LiveTv/Listings | |
| parent | c1e83beeac9c71481c6f1e0d6d0cad8a6c384fbe (diff) | |
update xmltv
Diffstat (limited to 'MediaBrowser.Server.Implementations/LiveTv/Listings')
| -rw-r--r-- | MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs index 14e4e1093a..4d24431e69 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs @@ -11,6 +11,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using Emby.XmlTv.Classes; +using Emby.XmlTv.Entities; using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Net; using MediaBrowser.Controller.Configuration; @@ -109,12 +110,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings return results.Select(p => new ProgramInfo() { ChannelId = p.ChannelId, - EndDate = p.EndDate, + EndDate = GetDate(p.EndDate), EpisodeNumber = p.Episode == null ? null : p.Episode.Episode, EpisodeTitle = p.Episode == null ? null : p.Episode.Title, Genres = p.Categories, Id = String.Format("{0}_{1:O}", p.ChannelId, p.StartDate), // Construct an id from the channel and start date, - StartDate = p.StartDate, + StartDate = GetDate(p.StartDate), Name = p.Title, Overview = p.Description, ShortOverview = p.Description, @@ -135,6 +136,15 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings }); } + private DateTime GetDate(DateTime date) + { + if (date.Kind != DateTimeKind.Utc) + { + date = DateTime.SpecifyKind(date, DateTimeKind.Utc); + } + return date; + } + public async Task AddMetadata(ListingsProviderInfo info, List<ChannelInfo> channels, CancellationToken cancellationToken) { // Add the channel image url |
