|
|
@ -44,20 +44,24 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
var channel = (Channel)item;
|
|
|
|
{
|
|
|
|
|
|
|
|
await DownloadImage(item, cancellationToken).ConfigureAwait(false);
|
|
|
|
if (channel.HasProviderImage ?? true)
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (HttpException ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Don't fail the provider on a 404
|
|
|
|
try
|
|
|
|
if (!ex.StatusCode.HasValue || ex.StatusCode.Value != HttpStatusCode.NotFound)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw;
|
|
|
|
await DownloadImage(item, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (HttpException ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// Don't fail the provider on a 404
|
|
|
|
|
|
|
|
if (!ex.StatusCode.HasValue || ex.StatusCode.Value != HttpStatusCode.NotFound)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetLastRefreshed(item, DateTime.UtcNow, providerInfo);
|
|
|
|
SetLastRefreshed(item, DateTime.UtcNow, providerInfo);
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|