mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-12 05:12:23 +01:00
grab image sizes at discovery time
This commit is contained in:
@@ -869,19 +869,22 @@ namespace MediaBrowser.Dlna.Didl
|
||||
|
||||
}
|
||||
|
||||
int? width = null;
|
||||
int? height = null;
|
||||
int? width = imageInfo.Width;
|
||||
int? height = imageInfo.Height;
|
||||
|
||||
try
|
||||
if (!height.HasValue && !width.HasValue)
|
||||
{
|
||||
var size = _imageProcessor.GetImageSize(imageInfo.Path, imageInfo.DateModified);
|
||||
try
|
||||
{
|
||||
var size = _imageProcessor.GetImageSize(imageInfo.Path, imageInfo.DateModified);
|
||||
|
||||
width = Convert.ToInt32(size.Width);
|
||||
height = Convert.ToInt32(size.Height);
|
||||
}
|
||||
catch
|
||||
{
|
||||
width = Convert.ToInt32(size.Width);
|
||||
height = Convert.ToInt32(size.Height);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return new ImageDownloadInfo
|
||||
|
||||
Reference in New Issue
Block a user