ensure only valid images are saved in ItemImageProvider
This commit is contained in:
parent
b49d50e634
commit
df60d176b8
|
@ -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