mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 03:48:06 +02:00
add tuner error handling
This commit is contained in:
parent
2743b79f02
commit
de1495763f
1 changed files with 22 additions and 8 deletions
|
@ -106,6 +106,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts
|
||||||
var hostsWithChannel = new List<TunerHostInfo>();
|
var hostsWithChannel = new List<TunerHostInfo>();
|
||||||
|
|
||||||
foreach (var host in hosts)
|
foreach (var host in hosts)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var channels = await GetChannels(host, true, cancellationToken).ConfigureAwait(false);
|
var channels = await GetChannels(host, true, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
|
@ -114,6 +116,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts
|
||||||
hostsWithChannel.Add(host);
|
hostsWithChannel.Add(host);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Error("Error getting channels", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var host in hostsWithChannel)
|
foreach (var host in hostsWithChannel)
|
||||||
{
|
{
|
||||||
|
@ -171,6 +178,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts
|
||||||
foreach (var host in hosts)
|
foreach (var host in hosts)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(streamId))
|
if (string.IsNullOrWhiteSpace(streamId))
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var channels = await GetChannels(host, true, cancellationToken).ConfigureAwait(false);
|
var channels = await GetChannels(host, true, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
|
@ -179,6 +188,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts
|
||||||
hostsWithChannel.Add(host);
|
hostsWithChannel.Add(host);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Error("Error getting channels", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (streamId.StartsWith(host.Id, StringComparison.OrdinalIgnoreCase))
|
else if (streamId.StartsWith(host.Id, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
hostsWithChannel = new List<TunerHostInfo> { host };
|
hostsWithChannel = new List<TunerHostInfo> { host };
|
||||||
|
|
Loading…
Reference in a new issue