mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Catch HttpRequestException when saving images from local provider
This commit is contained in:
parent
cb41dda5b3
commit
c86b064f80
@ -5,6 +5,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Net.Http;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
@ -679,8 +680,15 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
{
|
{
|
||||||
foreach (var remoteImage in localItem.RemoteImages)
|
foreach (var remoteImage in localItem.RemoteImages)
|
||||||
{
|
{
|
||||||
await ProviderManager.SaveImage(item, remoteImage.url, remoteImage.type, null, cancellationToken).ConfigureAwait(false);
|
try
|
||||||
refreshResult.UpdateType |= ItemUpdateType.ImageUpdate;
|
{
|
||||||
|
await ProviderManager.SaveImage(item, remoteImage.url, remoteImage.type, null, cancellationToken).ConfigureAwait(false);
|
||||||
|
refreshResult.UpdateType |= ItemUpdateType.ImageUpdate;
|
||||||
|
}
|
||||||
|
catch (HttpRequestException ex)
|
||||||
|
{
|
||||||
|
Logger.LogError(ex, "Could not save {ImageType} image: {Url}", Enum.GetName(remoteImage.type), remoteImage.url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (imageService.MergeImages(item, localItem.Images))
|
if (imageService.MergeImages(item, localItem.Images))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user