mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-05 17:56:18 +00:00
added HasImage to live tv objects
This commit is contained in:
@@ -44,20 +44,24 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
return true;
|
||||
}
|
||||
|
||||
try
|
||||
var channel = (Channel)item;
|
||||
|
||||
if (channel.HasProviderImage ?? true)
|
||||
{
|
||||
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)
|
||||
try
|
||||
{
|
||||
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);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -269,7 +269,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
Path = path,
|
||||
ChannelId = channelInfo.Id,
|
||||
ChannelNumber = channelInfo.Number,
|
||||
ServiceName = serviceName
|
||||
ServiceName = serviceName,
|
||||
HasProviderImage = channelInfo.HasImage
|
||||
};
|
||||
|
||||
isNew = true;
|
||||
|
||||
Reference in New Issue
Block a user