diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-10-17 15:49:55 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-10-17 15:49:55 -0400 |
| commit | 7adb3e4a238dc9139ec6873546759ebc36444610 (patch) | |
| tree | 3f287641687995a5a85ad127e0db577207295f20 | |
| parent | 98cd888801a11ec2e3e3b72db4e375c052ef7791 (diff) | |
fix dlna photos
| -rw-r--r-- | Emby.Dlna/Didl/DidlBuilder.cs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.cs index c6c213a48..be76e5816 100644 --- a/Emby.Dlna/Didl/DidlBuilder.cs +++ b/Emby.Dlna/Didl/DidlBuilder.cs @@ -1071,8 +1071,10 @@ namespace Emby.Dlna.Didl writer.WriteStartElement(string.Empty, "res", NS_DIDL); - var width = albumartUrlInfo.Width; - var height = albumartUrlInfo.Height; + // Images must have a reported size or many clients (Bubble upnp), will only use the first thumbnail + // rather than using a larger one when available + var width = albumartUrlInfo.Width ?? maxWidth; + var height = albumartUrlInfo.Height ?? maxHeight; var contentFeatures = new ContentFeatureBuilder(_profile) .BuildImageHeader(format, width, height, imageInfo.IsDirectStream, org_Pn); @@ -1083,10 +1085,7 @@ namespace Emby.Dlna.Didl contentFeatures )); - if (width.HasValue && height.HasValue) - { - writer.WriteAttributeString("resolution", string.Format("{0}x{1}", width.Value, height.Value)); - } + writer.WriteAttributeString("resolution", string.Format("{0}x{1}", width, height)); writer.WriteString(albumartUrlInfo.Url); |
