diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-12-23 17:25:34 +0000 |
|---|---|---|
| committer | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-12-23 17:25:34 +0000 |
| commit | 889e988167868c4a713214140a35502b727683e6 (patch) | |
| tree | 7cea77414fea735be7288906dd628c47fe4b1beb /Emby.Server.Implementations/LiveTv | |
| parent | 62702fa3eb5070ce8c57dc4e39551bcc4e64fa74 (diff) | |
| parent | f42208673facf26e475c9fad7a1e78b59358f3fa (diff) | |
Updated to latest unstable.
Diffstat (limited to 'Emby.Server.Implementations/LiveTv')
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index 90e6cc9668..b19ccadd8f 100644 --- a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -784,18 +784,17 @@ namespace Emby.Server.Implementations.LiveTv.Listings var allStations = root.stations ?? new List<ScheduleDirect.Station>(); var map = root.map; - int len = map.Count; - var array = new List<ChannelInfo>(len); - for (int i = 0; i < len; i++) + var list = new List<ChannelInfo>(map.Count); + foreach (var channel in map) { - var channelNumber = GetChannelNumber(map[i]); + var channelNumber = GetChannelNumber(channel); - var station = allStations.Find(item => string.Equals(item.stationID, map[i].stationID, StringComparison.OrdinalIgnoreCase)); + var station = allStations.Find(item => string.Equals(item.stationID, channel.stationID, StringComparison.OrdinalIgnoreCase)); if (station == null) { station = new ScheduleDirect.Station { - stationID = map[i].stationID + stationID = channel.stationID }; } @@ -812,10 +811,10 @@ namespace Emby.Server.Implementations.LiveTv.Listings channelInfo.ImageUrl = station.logo.URL; } - array[i] = channelInfo; + list.Add(channelInfo); } - return array; + return list; } private static string NormalizeName(string value) |
