From 9216fe821af40cfe5729a15b6adeb56dc4af8cf1 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 10 Aug 2015 16:13:42 -0400 Subject: [PATCH] update tv --- .../Listings/Emby/EmbyListingsNorthAmerica.cs | 61 ++++++++++++++++++- .../LiveTv/Listings/SchedulesDirect.cs | 2 +- 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/Emby/EmbyListingsNorthAmerica.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/Emby/EmbyListingsNorthAmerica.cs index 37025b8e86..8aa66cf1b6 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/Listings/Emby/EmbyListingsNorthAmerica.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/Emby/EmbyListingsNorthAmerica.cs @@ -25,6 +25,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings.Emby public async Task> GetProgramsAsync(ListingsProviderInfo info, string channelNumber, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken) { + var url = "https://data.emby.media/service/listings?id=" + info.ListingsId; + url += "&start=" + startDateUtc.ToString("s", System.Globalization.CultureInfo.InvariantCulture); + url += "&end=" + endDateUtc.ToString("s", System.Globalization.CultureInfo.InvariantCulture); + + var response = await GetResponse(url).ConfigureAwait(false); + return new List(); } @@ -53,7 +59,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings.Emby Name = GetName(i), Id = i.lineupID - }).ToList(); + }).OrderBy(i => i.Name).ToList(); } private string GetName(LineupInfo info) @@ -139,5 +145,58 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings.Emby public string country { get; set; } public List stations { get; set; } } + + private class ListingInfo + { + public string number { get; set; } + public int channelNumber { get; set; } + public int subChannelNumber { get; set; } + public int stationID { get; set; } + public string name { get; set; } + public string callsign { get; set; } + public string network { get; set; } + public string stationType { get; set; } + public string webLink { get; set; } + public string logoFilename { get; set; } + public int listingID { get; set; } + public string listDateTime { get; set; } + public int duration { get; set; } + public int showID { get; set; } + public int seriesID { get; set; } + public string showName { get; set; } + public string episodeTitle { get; set; } + public string episodeNumber { get; set; } + public int parts { get; set; } + public int partNum { get; set; } + public bool seriesPremiere { get; set; } + public bool seasonPremiere { get; set; } + public bool seriesFinale { get; set; } + public bool seasonFinale { get; set; } + public bool repeat { get; set; } + public bool @new { get; set; } + public string rating { get; set; } + public bool captioned { get; set; } + public bool educational { get; set; } + public bool blackWhite { get; set; } + public bool subtitled { get; set; } + public bool live { get; set; } + public bool hd { get; set; } + public bool descriptiveVideo { get; set; } + public bool inProgress { get; set; } + public string showTypeID { get; set; } + public int breakoutLevel { get; set; } + public string showType { get; set; } + public string year { get; set; } + public string guest { get; set; } + public string cast { get; set; } + public string director { get; set; } + public int starRating { get; set; } + public string description { get; set; } + public string league { get; set; } + public string team1 { get; set; } + public string team2 { get; set; } + public string @event { get; set; } + public string location { get; set; } + } } } diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index 2aadf4a665..457d1a4f19 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -16,7 +16,7 @@ using System.Threading.Tasks; namespace MediaBrowser.Server.Implementations.LiveTv.Listings { - public class SchedulesDirect : IListingsProvider + public class SchedulesDirect { private readonly ILogger _logger; private readonly IJsonSerializer _jsonSerializer;