mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 11:34:57 +02:00
Merge pull request #1372 from MediaBrowser/master
add tuner error handling
This commit is contained in:
commit
a7c7446bd0
1 changed files with 22 additions and 8 deletions
|
@ -107,11 +107,18 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts
|
|||
|
||||
foreach (var host in hosts)
|
||||
{
|
||||
var channels = await GetChannels(host, true, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (channels.Any(i => string.Equals(i.Id, channelId, StringComparison.OrdinalIgnoreCase)))
|
||||
try
|
||||
{
|
||||
hostsWithChannel.Add(host);
|
||||
var channels = await GetChannels(host, true, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (channels.Any(i => string.Equals(i.Id, channelId, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
hostsWithChannel.Add(host);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error("Error getting channels", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -172,11 +179,18 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts
|
|||
{
|
||||
if (string.IsNullOrWhiteSpace(streamId))
|
||||
{
|
||||
var channels = await GetChannels(host, true, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (channels.Any(i => string.Equals(i.Id, channelId, StringComparison.OrdinalIgnoreCase)))
|
||||
try
|
||||
{
|
||||
hostsWithChannel.Add(host);
|
||||
var channels = await GetChannels(host, true, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (channels.Any(i => string.Equals(i.Id, channelId, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
hostsWithChannel.Add(host);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error("Error getting channels", ex);
|
||||
}
|
||||
}
|
||||
else if (streamId.StartsWith(host.Id, StringComparison.OrdinalIgnoreCase))
|
||||
|
|
Loading…
Reference in a new issue