grab image sizes at discovery time

This commit is contained in:
Luke Pulverenti
2014-10-12 11:18:26 -04:00
parent 47915df62c
commit 69b83082c8
11 changed files with 112 additions and 105 deletions

View File

@@ -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