mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-23 14:10:40 +02:00
update tv
This commit is contained in:
parent
9216fe821a
commit
fe4d3bc57c
|
@ -1,4 +1,5 @@
|
||||||
using MediaBrowser.Common.Net;
|
using System.Globalization;
|
||||||
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Controller.LiveTv;
|
using MediaBrowser.Controller.LiveTv;
|
||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.LiveTv;
|
using MediaBrowser.Model.LiveTv;
|
||||||
|
@ -40,7 +41,27 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings.Emby
|
||||||
|
|
||||||
foreach (var channel in channels)
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue