mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #562 from hawken93/misc_fix
Fix error with uppercase photo extension and fix typo in a log line
This commit is contained in:
commit
f8dd182e42
@ -50,12 +50,13 @@ namespace Emby.Drawing.Common
|
|||||||
/// <exception cref="ArgumentException">The image was of an unrecognised format.</exception>
|
/// <exception cref="ArgumentException">The image was of an unrecognised format.</exception>
|
||||||
public static ImageSize GetDimensions(string path, ILogger logger, IFileSystem fileSystem)
|
public static ImageSize GetDimensions(string path, ILogger logger, IFileSystem fileSystem)
|
||||||
{
|
{
|
||||||
var extension = Path.GetExtension(path);
|
if (string.IsNullOrEmpty(path))
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(extension))
|
|
||||||
{
|
{
|
||||||
throw new ArgumentException("ImageHeader doesn't support image file");
|
throw new ArgumentNullException(nameof(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string extension = Path.GetExtension(path).ToLower();
|
||||||
|
|
||||||
if (!SupportedExtensions.Contains(extension))
|
if (!SupportedExtensions.Contains(extension))
|
||||||
{
|
{
|
||||||
throw new ArgumentException("ImageHeader doesn't support " + extension);
|
throw new ArgumentException("ImageHeader doesn't support " + extension);
|
||||||
|
@ -156,7 +156,7 @@ namespace Emby.Server.Implementations.IO
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.LogInformation("{name} ({path}}) will be refreshed.", item.Name, item.Path);
|
Logger.LogInformation("{name} ({path}) will be refreshed.", item.Name, item.Path);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user