Merge pull request #5672 from jellyfin/skip-bad-images
ensure only valid images are saved in ItemImageProvider
This commit is contained in:
commit
38913a42b4
|
@ -469,6 +469,7 @@ namespace MediaBrowser.Providers.Manager
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var response = await provider.GetImageResponse(url, cancellationToken).ConfigureAwait(false);
|
using var response = await provider.GetImageResponse(url, cancellationToken).ConfigureAwait(false);
|
||||||
|
response.EnsureSuccessStatusCode();
|
||||||
await using var stream = await response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
|
await using var stream = await response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
await _providerManager.SaveImage(
|
await _providerManager.SaveImage(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user