improve performance of getting channel list

This commit is contained in:
Luke Pulverenti
2017-04-16 21:45:44 -04:00
parent 25e6e0a572
commit eddcc46602
6 changed files with 84 additions and 25 deletions

View File

@@ -146,7 +146,7 @@ namespace Emby.Server.Implementations.Dto
if (channelTuples.Count > 0)
{
_livetvManager().AddChannelInfo(channelTuples, options, user);
await _livetvManager().AddChannelInfo(channelTuples, options, user).ConfigureAwait(false);
}
return list;
@@ -161,7 +161,8 @@ namespace Emby.Server.Implementations.Dto
if (tvChannel != null)
{
var list = new List<Tuple<BaseItemDto, LiveTvChannel>> { new Tuple<BaseItemDto, LiveTvChannel>(dto, tvChannel) };
_livetvManager().AddChannelInfo(list, options, user);
var task = _livetvManager().AddChannelInfo(list, options, user);
Task.WaitAll(task);
}
else if (item is LiveTvProgram)
{