ensure only valid images are saved in ItemImageProvider

This commit is contained in:
Claus Vium 2021-04-01 15:27:28 +02:00 committed by GitHub
parent b49d50e634
commit df60d176b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -469,6 +469,7 @@ namespace MediaBrowser.Providers.Manager
try
{
using var response = await provider.GetImageResponse(url, cancellationToken).ConfigureAwait(false);
response.EnsureSuccessStatusCode();
await using var stream = await response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
await _providerManager.SaveImage(