From d71c1a121f63b73a5e435745166b38aadbd060ca Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 20 Apr 2014 21:36:12 -0400 Subject: [PATCH] expose more dlna profile settings in the web interface --- dashboard-ui/dlnaprofile.html | 81 +++++++++++++++++++++++++--- dashboard-ui/scripts/dlnaprofile.js | 24 +++++++++ dashboard-ui/scripts/dlnaprofiles.js | 4 +- 3 files changed, 100 insertions(+), 9 deletions(-) diff --git a/dashboard-ui/dlnaprofile.html b/dashboard-ui/dlnaprofile.html index 2252d57cff..b698d37f3b 100644 --- a/dashboard-ui/dlnaprofile.html +++ b/dashboard-ui/dlnaprofile.html @@ -64,14 +64,81 @@ +
- +
+

${HeaderDisplaySettings}

+
+
    +
  • + + +
    If enabled, all folders are represented in DIDL as "object.container.storageFolder" instead of a more specific type, such as "object.container.person.musicArtist".
    +
  • +
  • + + +
    If enabled, all videos are represented in DIDL as "object.item.videoItem" instead of a more specific type, such as "object.item.videoItem.movie".
    +
  • +
+
+
+ +
+

${HeaderImageSettings}

+
+
    +
  • + + +
    Some devices prefer this method for obtaining album art. Others may fail to play with this option enabled.
    +
  • +
  • + + +
    PN used for album art, within the dlna:profileID attribute on upnp:albumArtURI. Default is JPEG_SM. Some clients require a specific value, regardless of the size of the image.
    +
  • +
  • + + +
    Max resolution of album art exposed via upnp:albumArtURI.
    +
  • +
  • + + +
    Max resolution of album art exposed via upnp:albumArtURI.
    +
  • +
  • + + +
    Max resolution of icons exposed via upnp:icon.
    +
  • +
  • + + +
    Max resolution of icons exposed via upnp:icon.
    +
  • +
+
+
+ +
+

${HeaderPlaybackSettings}

+
+
    +
  • + + +
    Specify a max bitrate in bandwidth constrained environments, or if the device imposes it's own limit.
    +
  • +
  • + + +
    If enabled, these requests will be honored but will ignore the byte range header.
    +
  • +
+
+
diff --git a/dashboard-ui/scripts/dlnaprofile.js b/dashboard-ui/scripts/dlnaprofile.js index cf30a1e25a..f04b9f5167 100644 --- a/dashboard-ui/scripts/dlnaprofile.js +++ b/dashboard-ui/scripts/dlnaprofile.js @@ -55,6 +55,18 @@ $('#txtIdSerialNumber', page).val(idInfo.SerialNumber || ''); $('#txtIdDeviceDescription', page).val(idInfo.DeviceDescription || ''); + $('#txtAlbumArtPn', page).val(profile.AlbumArtPn || ''); + $('#txtAlbumArtMaxWidth', page).val(profile.MaxAlbumArtWidth || ''); + $('#txtAlbumArtMaxHeight', page).val(profile.MaxAlbumArtHeight || ''); + $('#txtIconMaxWidth', page).val(profile.MaxIconWidth || ''); + $('#txtIconMaxHeight', page).val(profile.MaxIconHeight || ''); + + $('#chkIgnoreTranscodeByteRangeRequests', page).checked(profile.IgnoreTranscodeByteRangeRequests).checkboxradio('refresh'); + $('#txtMaxAllowedBitrate', page).val(profile.MaxBitrate || ''); + + $('#chkRequiresPlainFolders', page).checked(profile.RequiresPlainFolders).checkboxradio('refresh'); + $('#chkRequiresPlainVideoItems', page).checked(profile.RequiresPlainVideoItems).checkboxradio('refresh'); + profile.DirectPlayProfiles = (profile.DirectPlayProfiles || []); profile.TranscodingProfiles = (profile.TranscodingProfiles || []); profile.ContainerProfiles = (profile.ContainerProfiles || []); @@ -650,6 +662,18 @@ profile.Identification.SerialNumber = $('#txtIdSerialNumber', page).val(); profile.Identification.DeviceDescription = $('#txtIdDeviceDescription', page).val(); + profile.AlbumArtPn = $('#txtAlbumArtPn', page).val(); + profile.MaxAlbumArtWidth = $('#txtAlbumArtMaxWidth', page).val(); + profile.MaxAlbumArtHeight = $('#txtAlbumArtMaxHeight', page).val(); + profile.MaxIconWidth = $('#txtIconMaxWidth', page).val(); + profile.MaxIconHeight = $('#txtIconMaxHeight', page).val(); + + profile.RequiresPlainFolders = $('#chkRequiresPlainFolders', page).checked(); + profile.RequiresPlainVideoItems = $('#chkRequiresPlainVideoItems', page).checked(); + + profile.IgnoreTranscodeByteRangeRequests = $('#chkIgnoreTranscodeByteRangeRequests', page).checked(); + profile.MaxBitrate = $('#txtMaxAllowedBitrate', page).val(); + profile.UserId = $('#selectUser', page).val(); } diff --git a/dashboard-ui/scripts/dlnaprofiles.js b/dashboard-ui/scripts/dlnaprofiles.js index 75cbe8c8fd..cccad9a403 100644 --- a/dashboard-ui/scripts/dlnaprofiles.js +++ b/dashboard-ui/scripts/dlnaprofiles.js @@ -34,7 +34,7 @@ var profile = profiles[i]; html += '
  • '; - html += ''; + html += ''; html += profile.Name; html += ''; @@ -69,7 +69,7 @@ var profile = profiles[i]; html += '
  • '; - html += ''; + html += ''; html += profile.Name; html += ''; html += '
  • ';