Merge pull request #5672 from jellyfin/skip-bad-images

ensure only valid images are saved in ItemImageProvider
This commit is contained in:
Bond-009 2021-04-01 17:38:05 +02:00 committed by GitHub
commit 38913a42b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

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(