validate image aspect ratio > 0
This commit is contained in:
parent
54c5e88b87
commit
50a346fe5a
|
@ -1599,9 +1599,12 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fields.Contains(ItemFields.OriginalPrimaryImageAspectRatio))
|
if (fields.Contains(ItemFields.OriginalPrimaryImageAspectRatio))
|
||||||
|
{
|
||||||
|
if (size.Width > 0 && size.Height > 0)
|
||||||
{
|
{
|
||||||
dto.OriginalPrimaryImageAspectRatio = size.Width / size.Height;
|
dto.OriginalPrimaryImageAspectRatio = size.Width / size.Height;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var supportedEnhancers = _imageProcessor.GetSupportedEnhancers(item, ImageType.Primary).ToList();
|
var supportedEnhancers = _imageProcessor.GetSupportedEnhancers(item, ImageType.Primary).ToList();
|
||||||
|
|
||||||
|
@ -1617,7 +1620,10 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (size.Width > 0 && size.Height > 0)
|
||||||
|
{
|
||||||
dto.PrimaryImageAspectRatio = size.Width / size.Height;
|
dto.PrimaryImageAspectRatio = size.Width / size.Height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user