add EmbyTV error handling

This commit is contained in:
Luke Pulverenti 2015-06-28 21:19:37 -04:00
parent 944d06bdc4
commit 85c097a19f
3 changed files with 14 additions and 10 deletions

View File

@ -493,7 +493,7 @@
});
});
}
$('.EmbyTvConfigurationPage').on('pageshow', function (event) { fillFormData(this); });
$('.EmbyTvConfigurationPage').on('pageshowready', function (event) { fillFormData(this); });
$(".schedulesDirectLoginForm").off('submit').on('submit', function (e) {

View File

@ -256,12 +256,9 @@ namespace EmbyTV
await host.GetDeviceInfo(cancellationToken);
host.Enabled = true;
}
catch (HttpException)
{
host.Enabled = false;
}
catch (ApplicationException)
catch (Exception exception)
{
_logger.ErrorException("Error ensuring connection", exception);
host.Enabled = false;
}
}
@ -334,8 +331,15 @@ namespace EmbyTV
_tunerServer = TunerHostFactory.CreateTunerHosts(config.TunerHostsConfiguration, _logger, _jsonSerializer, _httpClient);
for (var i = 0; i < _tunerServer.Count(); i++)
{
await _tunerServer[i].GetDeviceInfo(cancellationToken);
config.TunerHostsConfiguration[i].ServerId = _tunerServer[i].HostId;
try
{
await _tunerServer[i].GetDeviceInfo(cancellationToken);
config.TunerHostsConfiguration[i].ServerId = _tunerServer[i].HostId;
}
catch (Exception exception)
{
_logger.ErrorException("Error getting device info", exception);
}
}
}
@ -609,8 +613,8 @@ namespace EmbyTV
public Task UpdateSeriesTimerAsync(SeriesTimerInfo info, CancellationToken cancellationToken)
{
UpdateTimersForSeriesTimer(info);
_seriesTimerProvider.Update(info);
UpdateTimersForSeriesTimer(info);
return Task.FromResult(true);
}

View File

@ -80,7 +80,7 @@ namespace EmbyTV
{
var list = GetAll().ToList();
if (list.Any(i => !EqualityComparer(i, item)))
if (!list.Any(i => EqualityComparer(i, item)))
{
Add(item);
}