mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
Merge pull request #5736 from jellyfin/catch-httprequestex-librarymanager
fetching images should not kill the scanner
This commit is contained in:
commit
6577f1deb2
1 changed files with 10 additions and 5 deletions
|
@ -1914,12 +1914,17 @@ namespace Emby.Server.Implementations.Library
|
||||||
}
|
}
|
||||||
catch (ArgumentException)
|
catch (ArgumentException)
|
||||||
{
|
{
|
||||||
_logger.LogWarning("Cannot get image index for {0}", img.Path);
|
_logger.LogWarning("Cannot get image index for {ImagePath}", img.Path);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
catch (InvalidOperationException)
|
catch (InvalidOperationException)
|
||||||
{
|
{
|
||||||
_logger.LogWarning("Cannot fetch image from {0}", img.Path);
|
_logger.LogWarning("Cannot fetch image from {ImagePath}", img.Path);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
catch (HttpRequestException ex)
|
||||||
|
{
|
||||||
|
_logger.LogWarning("Cannot fetch image from {ImagePath}. Http status code: {HttpStatus}", img.Path, ex.StatusCode);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1932,7 +1937,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Cannot get image dimensions for {0}", image.Path);
|
_logger.LogError(ex, "Cannot get image dimensions for {ImagePath}", image.Path);
|
||||||
image.Width = 0;
|
image.Width = 0;
|
||||||
image.Height = 0;
|
image.Height = 0;
|
||||||
continue;
|
continue;
|
||||||
|
@ -1944,7 +1949,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Cannot compute blurhash for {0}", image.Path);
|
_logger.LogError(ex, "Cannot compute blurhash for {ImagePath}", image.Path);
|
||||||
image.BlurHash = string.Empty;
|
image.BlurHash = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1954,7 +1959,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Cannot update DateModified for {0}", image.Path);
|
_logger.LogError(ex, "Cannot update DateModified for {ImagePath}", image.Path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue