aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-08-10 16:13:42 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-08-10 16:13:42 -0400
commit9216fe821af40cfe5729a15b6adeb56dc4af8cf1 (patch)
treeddc9db6494ed10e47246236cc70a23654092feff
parentf2f917ccee6bbabe155630ff7446c071c3228712 (diff)
update tv
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/Listings/Emby/EmbyListingsNorthAmerica.cs61
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs2
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 37025b8e8..8aa66cf1b 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<IEnumerable<ProgramInfo>> 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<ListingInfo[]>(url).ConfigureAwait(false);
+
return new List<ProgramInfo>();
}
@@ -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<Station> 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 2aadf4a66..457d1a4f1 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;