aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-08-10 16:20:23 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-08-10 16:20:23 -0400
commitfe4d3bc57c890a1c1dc33f40acef2495715d83ae (patch)
tree1d6d04b59c1815a94352de6cc480f50ae76c2302
parent9216fe821af40cfe5729a15b6adeb56dc4af8cf1 (diff)
update tv
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/Listings/Emby/EmbyListingsNorthAmerica.cs23
1 files changed, 22 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/Emby/EmbyListingsNorthAmerica.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/Emby/EmbyListingsNorthAmerica.cs
index 8aa66cf1b..18d0f8c21 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/Listings/Emby/EmbyListingsNorthAmerica.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/Emby/EmbyListingsNorthAmerica.cs
@@ -1,4 +1,5 @@
-using MediaBrowser.Common.Net;
+using System.Globalization;
+using MediaBrowser.Common.Net;
using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.LiveTv;
@@ -40,7 +41,27 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings.Emby
foreach (var channel in channels)
{
+ var station = response.stations.FirstOrDefault(i =>
+ {
+ var channelNumber = i.channelNumber.ToString(CultureInfo.InvariantCulture);
+ if (i.subChannelNumber > 0)
+ {
+ channelNumber += "." + i.subChannelNumber.ToString(CultureInfo.InvariantCulture);
+ }
+ return string.Equals(channelNumber, channel.Number, StringComparison.OrdinalIgnoreCase);
+ });
+
+ if (station != null)
+ {
+ channel.Name = station.name;
+
+ if (!string.IsNullOrWhiteSpace(station.logoFilename))
+ {
+ channel.HasImage = true;
+ channel.ImageUrl = "http://cdn.tvpassport.com/image/station/100x100/" + station.logoFilename;
+ }
+ }
}
}