mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 03:48:06 +02:00
Merge pull request #4852 from ryanpetris/fix-schedulesdirect-refresh
SchedulesDirect no longer refreshes channels properly
This commit is contained in:
commit
e36881f4fd
1 changed files with 7 additions and 8 deletions
|
@ -784,18 +784,17 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||||
var allStations = root.stations ?? new List<ScheduleDirect.Station>();
|
var allStations = root.stations ?? new List<ScheduleDirect.Station>();
|
||||||
|
|
||||||
var map = root.map;
|
var map = root.map;
|
||||||
int len = map.Count;
|
var list = new List<ChannelInfo>(map.Count);
|
||||||
var array = new List<ChannelInfo>(len);
|
foreach (var channel in map)
|
||||||
for (int i = 0; i < len; i++)
|
|
||||||
{
|
{
|
||||||
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)
|
if (station == null)
|
||||||
{
|
{
|
||||||
station = new ScheduleDirect.Station
|
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;
|
channelInfo.ImageUrl = station.logo.URL;
|
||||||
}
|
}
|
||||||
|
|
||||||
array[i] = channelInfo;
|
list.Add(channelInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string NormalizeName(string value)
|
private static string NormalizeName(string value)
|
||||||
|
|
Loading…
Reference in a new issue