Pārlūkot izejas kodu

expose more dlna profile settings in the web interface

Luke Pulverenti 11 gadi atpakaļ
vecāks
revīzija
3b4be92038
37 mainītis faili ar 231 papildinājumiem un 49 dzēšanām
  1. 13 1
      MediaBrowser.Api/UserLibrary/GenresService.cs
  2. 1 1
      MediaBrowser.Dlna/DlnaManager.cs
  3. 5 0
      MediaBrowser.Dlna/Profiles/DefaultProfile.cs
  4. 1 2
      MediaBrowser.Dlna/Profiles/WdtvLiveProfile.cs
  5. 6 0
      MediaBrowser.Dlna/Profiles/Xml/Default.xml
  6. 6 0
      MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml
  7. 6 0
      MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml
  8. 6 0
      MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml
  9. 6 0
      MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml
  10. 6 0
      MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml
  11. 6 0
      MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
  12. 6 0
      MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
  13. 6 0
      MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml
  14. 6 0
      MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml
  15. 6 0
      MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml
  16. 6 0
      MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml
  17. 6 0
      MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml
  18. 6 0
      MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml
  19. 6 0
      MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml
  20. 6 0
      MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml
  21. 6 0
      MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml
  22. 64 22
      MediaBrowser.Dlna/Server/ControlHandler.cs
  23. 6 1
      MediaBrowser.Dlna/Server/DescriptionXmlBuilder.cs
  24. 0 8
      MediaBrowser.Model/ApiClient/IApiClient.cs
  25. 1 1
      MediaBrowser.Model/Configuration/DlnaOptions.cs
  26. 10 0
      MediaBrowser.Model/Dlna/DeviceProfile.cs
  27. 17 11
      MediaBrowser.Model/Dlna/StreamBuilder.cs
  28. 8 0
      MediaBrowser.Model/Dlna/StreamInfo.cs
  29. 0 0
      MediaBrowser.Server.Implementations/Localization/JavaScript/el.json
  30. 0 0
      MediaBrowser.Server.Implementations/Localization/Server/el.json
  31. 0 0
      MediaBrowser.Server.Implementations/Localization/Server/es_MX.json
  32. 0 0
      MediaBrowser.Server.Implementations/Localization/Server/fr.json
  33. 0 0
      MediaBrowser.Server.Implementations/Localization/Server/kk.json
  34. 0 0
      MediaBrowser.Server.Implementations/Localization/Server/pt_PT.json
  35. 0 0
      MediaBrowser.Server.Implementations/Localization/Server/ru.json
  36. 3 2
      MediaBrowser.Server.Implementations/Localization/Server/server.json
  37. 0 0
      MediaBrowser.Server.Implementations/Localization/Server/sv.json

+ 13 - 1
MediaBrowser.Api/UserLibrary/GenresService.cs

@@ -110,7 +110,19 @@ namespace MediaBrowser.Api.UserLibrary
             return items
                 .SelectMany(i => i.Genres)
                 .Distinct(StringComparer.OrdinalIgnoreCase)
-                .Select(name => LibraryManager.GetGenre(name));
+                .Select(name =>
+                {
+                    try
+                    {
+                        return LibraryManager.GetGenre(name);
+                    }
+                    catch (Exception ex)
+                    {
+                        Logger.ErrorException("Error getting genre {0}", ex, name);
+                        return null;
+                    }
+                })
+                .Where(i => i != null);
         }
     }
 }

+ 1 - 1
MediaBrowser.Dlna/DlnaManager.cs

@@ -49,7 +49,7 @@ namespace MediaBrowser.Dlna
             _userDataManager = userDataManager;
             _config = config;
 
-            //DumpProfiles();
+            DumpProfiles();
         }
 
         public IEnumerable<DeviceProfile> GetProfiles()

+ 5 - 0
MediaBrowser.Dlna/Profiles/DefaultProfile.cs

@@ -20,6 +20,11 @@ namespace MediaBrowser.Dlna.Profiles
             ModelUrl = "http://mediabrowser3.com/";
             ManufacturerUrl = "http://mediabrowser3.com/";
 
+            AlbumArtPn = "JPEG_SM";
+
+            MaxAlbumArtHeight = 512;
+            MaxAlbumArtWidth = 512;
+
             TranscodingProfiles = new[]
             {
                 new TranscodingProfile

+ 1 - 2
MediaBrowser.Dlna/Profiles/WdtvLiveProfile.cs

@@ -1,6 +1,5 @@
-using MediaBrowser.Controller.Dlna;
+using MediaBrowser.Model.Dlna;
 using System.Xml.Serialization;
-using MediaBrowser.Model.Dlna;
 
 namespace MediaBrowser.Dlna.Profiles
 {

+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/Default.xml

@@ -11,6 +11,12 @@
   <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
   <EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
   <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>512</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>512</MaxAlbumArtHeight>
+  <MaxIconWidth xsi:nil="true" />
+  <MaxIconHeight xsi:nil="true" />
+  <MaxBitrate xsi:nil="true" />
   <ProtocolInfo>DLNA</ProtocolInfo>
   <TimelineOffsetSeconds>0</TimelineOffsetSeconds>
   <RequiresPlainVideoItems>false</RequiresPlainVideoItems>

+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml

@@ -16,6 +16,12 @@
   <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
   <EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
   <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>512</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>512</MaxAlbumArtHeight>
+  <MaxIconWidth xsi:nil="true" />
+  <MaxIconHeight xsi:nil="true" />
+  <MaxBitrate xsi:nil="true" />
   <ProtocolInfo>DLNA</ProtocolInfo>
   <TimelineOffsetSeconds>0</TimelineOffsetSeconds>
   <RequiresPlainVideoItems>false</RequiresPlainVideoItems>

+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml

@@ -17,6 +17,12 @@
   <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
   <EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
   <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>512</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>512</MaxAlbumArtHeight>
+  <MaxIconWidth xsi:nil="true" />
+  <MaxIconHeight xsi:nil="true" />
+  <MaxBitrate xsi:nil="true" />
   <ProtocolInfo>DLNA</ProtocolInfo>
   <TimelineOffsetSeconds>10</TimelineOffsetSeconds>
   <RequiresPlainVideoItems>false</RequiresPlainVideoItems>

+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml

@@ -15,6 +15,12 @@
   <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
   <EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
   <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>512</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>512</MaxAlbumArtHeight>
+  <MaxIconWidth xsi:nil="true" />
+  <MaxIconHeight xsi:nil="true" />
+  <MaxBitrate xsi:nil="true" />
   <ProtocolInfo>DLNA</ProtocolInfo>
   <TimelineOffsetSeconds>0</TimelineOffsetSeconds>
   <RequiresPlainVideoItems>false</RequiresPlainVideoItems>

+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml

@@ -18,6 +18,12 @@
   <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
   <EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
   <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>512</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>512</MaxAlbumArtHeight>
+  <MaxIconWidth xsi:nil="true" />
+  <MaxIconHeight xsi:nil="true" />
+  <MaxBitrate xsi:nil="true" />
   <ProtocolInfo>DLNA</ProtocolInfo>
   <TimelineOffsetSeconds>10</TimelineOffsetSeconds>
   <RequiresPlainVideoItems>false</RequiresPlainVideoItems>

+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml

@@ -15,6 +15,12 @@
   <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
   <EnableAlbumArtInDidl>true</EnableAlbumArtInDidl>
   <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>512</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>512</MaxAlbumArtHeight>
+  <MaxIconWidth xsi:nil="true" />
+  <MaxIconHeight xsi:nil="true" />
+  <MaxBitrate xsi:nil="true" />
   <ProtocolInfo>DLNA</ProtocolInfo>
   <TimelineOffsetSeconds>0</TimelineOffsetSeconds>
   <RequiresPlainVideoItems>false</RequiresPlainVideoItems>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml


+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml

@@ -18,6 +18,12 @@
   <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
   <EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
   <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>512</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>512</MaxAlbumArtHeight>
+  <MaxIconWidth xsi:nil="true" />
+  <MaxIconHeight xsi:nil="true" />
+  <MaxBitrate xsi:nil="true" />
   <SonyAggregationFlags>10</SonyAggregationFlags>
   <ProtocolInfo>http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000</ProtocolInfo>
   <TimelineOffsetSeconds>0</TimelineOffsetSeconds>

+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml

@@ -18,6 +18,12 @@
   <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
   <EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
   <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>512</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>512</MaxAlbumArtHeight>
+  <MaxIconWidth xsi:nil="true" />
+  <MaxIconHeight xsi:nil="true" />
+  <MaxBitrate xsi:nil="true" />
   <SonyAggregationFlags>10</SonyAggregationFlags>
   <ProtocolInfo>DLNA</ProtocolInfo>
   <TimelineOffsetSeconds>0</TimelineOffsetSeconds>

+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml

@@ -18,6 +18,12 @@
   <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
   <EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
   <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>512</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>512</MaxAlbumArtHeight>
+  <MaxIconWidth xsi:nil="true" />
+  <MaxIconHeight xsi:nil="true" />
+  <MaxBitrate xsi:nil="true" />
   <SonyAggregationFlags>10</SonyAggregationFlags>
   <ProtocolInfo>DLNA</ProtocolInfo>
   <TimelineOffsetSeconds>0</TimelineOffsetSeconds>

+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml

@@ -18,6 +18,12 @@
   <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
   <EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
   <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>512</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>512</MaxAlbumArtHeight>
+  <MaxIconWidth xsi:nil="true" />
+  <MaxIconHeight xsi:nil="true" />
+  <MaxBitrate xsi:nil="true" />
   <SonyAggregationFlags>10</SonyAggregationFlags>
   <ProtocolInfo>DLNA</ProtocolInfo>
   <TimelineOffsetSeconds>0</TimelineOffsetSeconds>

+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml

@@ -18,6 +18,12 @@
   <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
   <EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
   <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>512</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>512</MaxAlbumArtHeight>
+  <MaxIconWidth xsi:nil="true" />
+  <MaxIconHeight xsi:nil="true" />
+  <MaxBitrate xsi:nil="true" />
   <XDlnaDoc>DMS-1.50</XDlnaDoc>
   <SonyAggregationFlags>10</SonyAggregationFlags>
   <ProtocolInfo>DLNA</ProtocolInfo>

+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml

@@ -18,6 +18,12 @@
   <IgnoreTranscodeByteRangeRequests>true</IgnoreTranscodeByteRangeRequests>
   <EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
   <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>512</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>512</MaxAlbumArtHeight>
+  <MaxIconWidth xsi:nil="true" />
+  <MaxIconHeight xsi:nil="true" />
+  <MaxBitrate xsi:nil="true" />
   <ProtocolInfo>DLNA</ProtocolInfo>
   <TimelineOffsetSeconds>5</TimelineOffsetSeconds>
   <RequiresPlainVideoItems>false</RequiresPlainVideoItems>

+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml

@@ -18,6 +18,12 @@
   <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
   <EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
   <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>512</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>512</MaxAlbumArtHeight>
+  <MaxIconWidth xsi:nil="true" />
+  <MaxIconHeight xsi:nil="true" />
+  <MaxBitrate xsi:nil="true" />
   <XDlnaDoc>DMS-1.50</XDlnaDoc>
   <ProtocolInfo>DLNA</ProtocolInfo>
   <TimelineOffsetSeconds>40</TimelineOffsetSeconds>

+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml

@@ -16,6 +16,12 @@
   <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
   <EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
   <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>512</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>512</MaxAlbumArtHeight>
+  <MaxIconWidth xsi:nil="true" />
+  <MaxIconHeight xsi:nil="true" />
+  <MaxBitrate xsi:nil="true" />
   <XDlnaDoc>DMS-1.50</XDlnaDoc>
   <ProtocolInfo>DLNA</ProtocolInfo>
   <TimelineOffsetSeconds>0</TimelineOffsetSeconds>

+ 6 - 0
MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml

@@ -17,6 +17,12 @@
   <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
   <EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
   <SupportedMediaTypes>Audio</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>512</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>512</MaxAlbumArtHeight>
+  <MaxIconWidth xsi:nil="true" />
+  <MaxIconHeight xsi:nil="true" />
+  <MaxBitrate xsi:nil="true" />
   <ProtocolInfo>DLNA</ProtocolInfo>
   <TimelineOffsetSeconds>0</TimelineOffsetSeconds>
   <RequiresPlainVideoItems>false</RequiresPlainVideoItems>

+ 64 - 22
MediaBrowser.Dlna/Server/ControlHandler.cs

@@ -9,6 +9,7 @@ using MediaBrowser.Controller.Entities.Movies;
 using MediaBrowser.Controller.Entities.TV;
 using MediaBrowser.Controller.Library;
 using MediaBrowser.Model.Dlna;
+using MediaBrowser.Model.Drawing;
 using MediaBrowser.Model.Entities;
 using MediaBrowser.Model.Logging;
 using MediaBrowser.Model.Querying;
@@ -265,7 +266,7 @@ namespace MediaBrowser.Dlna.Server
             var children = GetChildrenSorted(folder, user, sortCriteria).ToList();
 
             var totalCount = children.Count;
-            
+
             if (string.Equals(flag, "BrowseMetadata"))
             {
                 Browse_AddFolder(result, folder, children.Count, filter);
@@ -818,14 +819,14 @@ namespace MediaBrowser.Dlna.Server
                 }
             }
 
-            if (item.Genres.Count > 0)
+            foreach (var genre in item.Genres)
             {
-                AddValue(element, "upnp", "genre", item.Genres[0], NS_UPNP);
+                AddValue(element, "upnp", "genre", genre, NS_UPNP);
             }
 
-            if (item.Studios.Count > 0)
+            foreach (var studio in item.Studios)
             {
-                AddValue(element, "upnp", "publisher", item.Studios[0], NS_UPNP);
+                AddValue(element, "upnp", "publisher", studio, NS_UPNP);
             }
 
             if (filter.Contains("dc:title"))
@@ -871,9 +872,9 @@ namespace MediaBrowser.Dlna.Server
 
             if (audio != null)
             {
-                if (audio.Artists.Count > 0)
+                foreach (var artist in audio.Artists)
                 {
-                    AddValue(element, "upnp", "artist", audio.Artists[0], NS_UPNP);
+                    AddValue(element, "upnp", "artist", artist, NS_UPNP);
                 }
 
                 if (!string.IsNullOrEmpty(audio.Album))
@@ -930,20 +931,21 @@ namespace MediaBrowser.Dlna.Server
 
             var result = element.OwnerDocument;
 
-            var curl = GetImageUrl(imageInfo);
+            var albumartUrlInfo = GetImageUrl(imageInfo, _profile.MaxAlbumArtWidth, _profile.MaxAlbumArtHeight);
 
             var icon = result.CreateElement("upnp", "albumArtURI", NS_UPNP);
             var profile = result.CreateAttribute("dlna", "profileID", NS_DLNA);
-            profile.InnerText = "JPEG_TN";
+            profile.InnerText = _profile.AlbumArtPn;
             icon.SetAttributeNode(profile);
-            icon.InnerText = curl;
+            icon.InnerText = albumartUrlInfo.Url;
             element.AppendChild(icon);
 
+            var iconUrlInfo = GetImageUrl(imageInfo, _profile.MaxIconWidth, _profile.MaxIconHeight);
             icon = result.CreateElement("upnp", "icon", NS_UPNP);
             profile = result.CreateAttribute("dlna", "profileID", NS_DLNA);
-            profile.InnerText = "JPEG_TN";
+            profile.InnerText = _profile.AlbumArtPn;
             icon.SetAttributeNode(profile);
-            icon.InnerText = curl;
+            icon.InnerText = iconUrlInfo.Url;
             element.AppendChild(icon);
 
             if (!_profile.EnableAlbumArtInDidl)
@@ -952,10 +954,11 @@ namespace MediaBrowser.Dlna.Server
             }
 
             var res = result.CreateElement(string.Empty, "res", NS_DIDL);
-            res.InnerText = curl;
 
-            int? width = imageInfo.Width;
-            int? height = imageInfo.Height;
+            res.InnerText = albumartUrlInfo.Url;
+
+            var width = albumartUrlInfo.Width;
+            var height = albumartUrlInfo.Height;
 
             var mediaProfile = new MediaFormatProfileResolver().ResolveImageFormat("jpg", width, height);
 
@@ -968,11 +971,6 @@ namespace MediaBrowser.Dlna.Server
             {
                 res.SetAttribute("resolution", string.Format("{0}x{1}", width.Value, height.Value));
             }
-            else
-            {
-                // TODO: Devices need to see something here?
-                res.SetAttribute("resolution", "200x200");
-            }
 
             element.AppendChild(res);
         }
@@ -1052,13 +1050,57 @@ namespace MediaBrowser.Dlna.Server
             internal int? Height;
         }
 
-        private string GetImageUrl(ImageDownloadInfo info)
+        class ImageUrlInfo
+        {
+            internal string Url;
+
+            internal int? Width;
+            internal int? Height;
+        }
+
+        private ImageUrlInfo GetImageUrl(ImageDownloadInfo info, int? maxWidth, int? maxHeight)
         {
-            return string.Format("{0}/Items/{1}/Images/{2}?tag={3}&format=jpg",
+            var url = string.Format("{0}/Items/{1}/Images/{2}?tag={3}&format=jpg",
                 _serverAddress,
                 info.ItemId,
                 info.Type,
                 info.ImageTag);
+
+            if (maxWidth.HasValue)
+            {
+                url += "&maxWidth=" + maxWidth.Value.ToString(_usCulture);
+            }
+
+            if (maxHeight.HasValue)
+            {
+                url += "&maxHeight=" + maxHeight.Value.ToString(_usCulture);
+            }
+
+            var width = info.Width;
+            var height = info.Height;
+
+            if (width.HasValue && height.HasValue)
+            {
+                if (maxWidth.HasValue || maxHeight.HasValue)
+                {
+                    var newSize = DrawingUtils.Resize(new ImageSize
+                    {
+                        Height = height.Value,
+                        Width = width.Value
+
+                    }, maxWidth: maxWidth, maxHeight: maxHeight);
+
+                    width = Convert.ToInt32(newSize.Width);
+                    height = Convert.ToInt32(newSize.Height);
+                }
+            }
+
+            return new ImageUrlInfo
+            {
+                Url = url,
+                Width = width,
+                Height = height
+            };
         }
     }
 }

+ 6 - 1
MediaBrowser.Dlna/Server/DescriptionXmlBuilder.cs

@@ -59,7 +59,7 @@ namespace MediaBrowser.Dlna.Server
         {
             builder.Append("<UDN>uuid:" + SecurityElement.Escape(_serverUdn) + "</UDN>");
             builder.Append("<dlna:X_DLNACAP>" + SecurityElement.Escape(_profile.XDlnaCap ?? string.Empty) + "</dlna:X_DLNACAP>");
-
+            
             if (!string.IsNullOrWhiteSpace(_profile.XDlnaDoc))
             {
                 builder.Append("<dlna:X_DLNADOC xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\">" +
@@ -82,6 +82,11 @@ namespace MediaBrowser.Dlna.Server
 
             builder.Append("<sec:ProductCap>DCM10,getMediaInfo.sec</sec:ProductCap>");
             builder.Append("<sec:X_ProductCap>DCM10,getMediaInfo.sec</sec:X_ProductCap>");
+
+            if (!string.IsNullOrWhiteSpace(_profile.SonyAggregationFlags))
+            {
+                builder.Append("<av:aggregationFlags xmlns:av=\"urn:schemas-sony-com:av\">" + SecurityElement.Escape(_profile.SonyAggregationFlags) + "</av:aggregationFlags>");
+            }
         }
 
         private void AppendIconList(StringBuilder builder)

+ 0 - 8
MediaBrowser.Model/ApiClient/IApiClient.cs

@@ -923,14 +923,6 @@ namespace MediaBrowser.Model.ApiClient
         /// <exception cref="ArgumentNullException">options</exception>
         string GetVideoStreamUrl(VideoStreamOptions options);
 
-        /// <summary>
-        /// Formulates a url for streaming audio using the HLS protocol
-        /// </summary>
-        /// <param name="options">The options.</param>
-        /// <returns>System.String.</returns>
-        /// <exception cref="ArgumentNullException">options</exception>
-        string GetHlsAudioStreamUrl(StreamOptions options);
-
         /// <summary>
         /// Formulates a url for streaming video using the HLS protocol
         /// </summary>

+ 1 - 1
MediaBrowser.Model/Configuration/DlnaOptions.cs

@@ -17,7 +17,7 @@ namespace MediaBrowser.Model.Configuration
             EnableServer = true;
             BlastAliveMessages = true;
             ClientDiscoveryIntervalSeconds = 60;
-            BlastAliveMessageIntervalSeconds = 60;
+            BlastAliveMessageIntervalSeconds = 30;
         }
     }
 }

+ 10 - 0
MediaBrowser.Model/Dlna/DeviceProfile.cs

@@ -41,6 +41,16 @@ namespace MediaBrowser.Model.Dlna
         public string SupportedMediaTypes { get; set; }
 
         public string UserId { get; set; }
+
+        public string AlbumArtPn { get; set; }
+
+        public int? MaxAlbumArtWidth { get; set; }
+        public int? MaxAlbumArtHeight { get; set; }
+
+        public int? MaxIconWidth { get; set; }
+        public int? MaxIconHeight { get; set; }
+
+        public int? MaxBitrate { get; set; }
         
         /// <summary>
         /// Controls the content of the X_DLNADOC element in the urn:schemas-dlna-org:device-1-0 namespace.

+ 17 - 11
MediaBrowser.Model/Dlna/StreamBuilder.cs

@@ -85,10 +85,12 @@ namespace MediaBrowser.Model.Dlna
                 RunTimeTicks = item.RunTimeTicks
             };
 
+            var maxBitrateSetting = options.MaxBitrate ?? options.Profile.MaxBitrate;
+
             var audioStream = item.MediaStreams.FirstOrDefault(i => i.Type == MediaStreamType.Audio);
 
             // Honor the max bitrate setting
-            if (IsAudioEligibleForDirectPlay(item, options))
+            if (IsAudioEligibleForDirectPlay(item, maxBitrateSetting))
             {
                 var directPlay = options.Profile.DirectPlayProfiles
                     .FirstOrDefault(i => i.Type == playlistItem.MediaType && IsAudioDirectPlaySupported(i, item, audioStream));
@@ -119,6 +121,7 @@ namespace MediaBrowser.Model.Dlna
                 playlistItem.EstimateContentLength = transcodingProfile.EstimateContentLength;
                 playlistItem.Container = transcodingProfile.Container;
                 playlistItem.AudioCodec = transcodingProfile.AudioCodec;
+                playlistItem.Protocol = transcodingProfile.Protocol;
 
                 var audioTranscodingConditions = options.Profile.CodecProfiles
                     .Where(i => i.Type == CodecType.Audio && i.ContainsCodec(transcodingProfile.AudioCodec))
@@ -136,11 +139,11 @@ namespace MediaBrowser.Model.Dlna
                 }
 
                 // Honor requested max bitrate
-                if (options.MaxBitrate.HasValue)
+                if (maxBitrateSetting.HasValue)
                 {
-                    var currentValue = playlistItem.AudioBitrate ?? options.MaxBitrate.Value;
+                    var currentValue = playlistItem.AudioBitrate ?? maxBitrateSetting.Value;
 
-                    playlistItem.AudioBitrate = Math.Min(options.MaxBitrate.Value, currentValue);
+                    playlistItem.AudioBitrate = Math.Min(maxBitrateSetting.Value, currentValue);
                 }
             }
 
@@ -160,7 +163,9 @@ namespace MediaBrowser.Model.Dlna
             var audioStream = item.MediaStreams.FirstOrDefault(i => i.Type == MediaStreamType.Audio);
             var videoStream = item.MediaStreams.FirstOrDefault(i => i.Type == MediaStreamType.Video);
 
-            if (IsEligibleForDirectPlay(item, options))
+            var maxBitrateSetting = options.MaxBitrate ?? options.Profile.MaxBitrate;
+
+            if (IsEligibleForDirectPlay(item, options, maxBitrateSetting))
             {
                 // See if it can be direct played
                 var directPlay = options.Profile.DirectPlayProfiles
@@ -201,6 +206,7 @@ namespace MediaBrowser.Model.Dlna
                 playlistItem.TranscodeSeekInfo = transcodingProfile.TranscodeSeekInfo;
                 playlistItem.AudioCodec = transcodingProfile.AudioCodec.Split(',').FirstOrDefault();
                 playlistItem.VideoCodec = transcodingProfile.VideoCodec;
+                playlistItem.Protocol = transcodingProfile.Protocol;
 
                 var videoTranscodingConditions = options.Profile.CodecProfiles
                     .Where(i => i.Type == CodecType.Video && i.ContainsCodec(transcodingProfile.VideoCodec))
@@ -233,9 +239,9 @@ namespace MediaBrowser.Model.Dlna
                 }
 
                 // Honor max rate
-                if (options.MaxBitrate.HasValue)
+                if (maxBitrateSetting.HasValue)
                 {
-                    var videoBitrate = options.MaxBitrate.Value;
+                    var videoBitrate = maxBitrateSetting.Value;
 
                     if (playlistItem.AudioBitrate.HasValue)
                     {
@@ -251,7 +257,7 @@ namespace MediaBrowser.Model.Dlna
             return playlistItem;
         }
 
-        private bool IsEligibleForDirectPlay(MediaSourceInfo item, VideoOptions options)
+        private bool IsEligibleForDirectPlay(MediaSourceInfo item, VideoOptions options, int? maxBitrate)
         {
             if (options.SubtitleStreamIndex.HasValue)
             {
@@ -264,13 +270,13 @@ namespace MediaBrowser.Model.Dlna
                 return false;
             }
 
-            return IsAudioEligibleForDirectPlay(item, options);
+            return IsAudioEligibleForDirectPlay(item, maxBitrate);
         }
 
-        private bool IsAudioEligibleForDirectPlay(MediaSourceInfo item, AudioOptions options)
+        private bool IsAudioEligibleForDirectPlay(MediaSourceInfo item, int? maxBitrate)
         {
             // Honor the max bitrate setting
-            return !options.MaxBitrate.HasValue || (item.Bitrate.HasValue && item.Bitrate.Value <= options.MaxBitrate.Value);
+            return !maxBitrate.HasValue || (item.Bitrate.HasValue && item.Bitrate.Value <= maxBitrate.Value);
         }
 
         private void ValidateInput(VideoOptions options)

+ 8 - 0
MediaBrowser.Model/Dlna/StreamInfo.cs

@@ -20,6 +20,8 @@ namespace MediaBrowser.Model.Dlna
 
         public string Container { get; set; }
 
+        public string Protocol { get; set; }
+
         public long StartPositionTicks { get; set; }
 
         public string VideoCodec { get; set; }
@@ -84,6 +86,12 @@ namespace MediaBrowser.Model.Dlna
             {
                 return string.Format("{0}/audio/{1}/stream{2}?{3}", baseUrl, ItemId, extension, dlnaCommand);
             }
+
+            if (string.Equals(Protocol, "hls", StringComparison.OrdinalIgnoreCase))
+            {
+                return string.Format("{0}/videos/{1}/stream.m3u8?{2}", baseUrl, ItemId, dlnaCommand);
+            }
+
             return string.Format("{0}/videos/{1}/stream{2}?{3}", baseUrl, ItemId, extension, dlnaCommand);
         }
 

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
MediaBrowser.Server.Implementations/Localization/JavaScript/el.json


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
MediaBrowser.Server.Implementations/Localization/Server/el.json


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
MediaBrowser.Server.Implementations/Localization/Server/es_MX.json


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
MediaBrowser.Server.Implementations/Localization/Server/fr.json


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
MediaBrowser.Server.Implementations/Localization/Server/kk.json


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
MediaBrowser.Server.Implementations/Localization/Server/pt_PT.json


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
MediaBrowser.Server.Implementations/Localization/Server/ru.json


+ 3 - 2
MediaBrowser.Server.Implementations/Localization/Server/server.json

@@ -59,6 +59,7 @@
 	"LabelDisplayMissingEpisodesWithinSeasons": "Display missing episodes within seasons",
 	"LabelUnairedMissingEpisodesWithinSeasons": "Display unaired episodes within seasons",
 	"HeaderVideoPlaybackSettings": "Video Playback Settings",
+	"HeaderPlaybackSettings": "Playback Settings",
 	"LabelAudioLanguagePreference": "Audio language preference:",
 	"LabelSubtitleLanguagePreference": "Subtitle language preference:",
 	"LabelDisplayForcedSubtitlesOnly": "Display only forced subtitles",
@@ -418,7 +419,7 @@
 	"HeaderCustomDlnaProfiles": "Custom Profiles",
 	"HeaderSystemDlnaProfiles": "System Profiles",
 	"CustomDlnaProfilesHelp": "Create a custom profile to target a new device or override a system profile.",
-	"SystemDlnaProfilesHelp": "System profiles are read-only. To override a system profile, create a custom profile targeting the same device.",
+	"SystemDlnaProfilesHelp": "System profiles are read-only. Changes to a system profile will be saved to a new custom profile.",
 	"TitleDashboard": "Dashboard",
 	"TabHome": "Home",
 	"TabInfo": "Info",
@@ -542,5 +543,5 @@
 	"LabelBlastMessageInterval": "Alive message interval (seconds)",
 	"LabelBlastMessageIntervalHelp": "Determines the duration in seconds between server alive messages.",
 	"LabelDefaultUser": "Default user:",
-	"LabelDefaultUserHelp": "Determines which user library should be displayed on connected devices. This can be overridden using a device profile."
+	"LabelDefaultUserHelp": "Determines which user library should be displayed on connected devices. This can be overridden for each device using profiles."
 }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
MediaBrowser.Server.Implementations/Localization/Server/sv.json


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels