From 643bd19c150aa3cf0cc4d7616a2b727762327c0a Mon Sep 17 00:00:00 2001 From: Martin Schmidt Date: Tue, 3 May 2022 17:14:57 +0200 Subject: [PATCH 1/5] feat(DLNA): create DLNA page --- .../components/System/SelectedDlnaProfile.vue | 924 ++++++++++++++++++ frontend/locales/en-US.json | 169 ++++ frontend/pages/settings/dlna.vue | 249 +++++ frontend/pages/settings/index.vue | 3 +- 4 files changed, 1344 insertions(+), 1 deletion(-) create mode 100644 frontend/components/System/SelectedDlnaProfile.vue create mode 100644 frontend/pages/settings/dlna.vue diff --git a/frontend/components/System/SelectedDlnaProfile.vue b/frontend/components/System/SelectedDlnaProfile.vue new file mode 100644 index 00000000000..6106f87de82 --- /dev/null +++ b/frontend/components/System/SelectedDlnaProfile.vue @@ -0,0 +1,924 @@ + + + + + diff --git a/frontend/locales/en-US.json b/frontend/locales/en-US.json index 6f397f8e98b..6906ddd483f 100644 --- a/frontend/locales/en-US.json +++ b/frontend/locales/en-US.json @@ -323,6 +323,175 @@ "revokeFailure": "Error revoking API key", "revokeSuccess": "Successfully revoked API key" }, + "dlna": { + "dlna": "DLNA", + "EnablePlayTo": { + "text": "Enable DLNA Play To", + "description": "Detect devices within your network and offer the ability to control them remotely." + }, + "EnableDebugLog": { + "text": "Enable DLNA debug logging", + "description": "Create large log files and should only be used as needed for troubleshooting purposes." + }, + "ClientDiscoveryIntervalSeconds": { + "text": "Client discovery interval", + "description": "Determines the duration in seconds between SSDP searches." + }, + "EnableServer": { + "text": "Enable DLNA server", + "description": "Allows UPnP devices on your network to browse and play content." + }, + "BlastAliveMessages": { + "text": "Blast alive messages", + "description": "Enable this if the server is not detected reliably by other UPnP devices on your network." + }, + "AliveMessageIntervalSeconds": { + "text": "Alive message interval", + "description": "Determines the duration in seconds between blast alive messages." + }, + "DefaultUserId": { + "text": "Default user", + "description": "Determines which user library should be displayed on connected devices. This can be overridden for each device using profiles.", + "selector": "Select default user" + }, + "profile": { + "new": "New Profile", + "name": "Profile name", + "custom": { + "text": "Custom profiles", + "subtitle": "Create a custom profile to target a new device or override a system profile." + }, + "system": { + "text": "System profiles", + "subtitle": "System profiles are read-only. Changes to a system profile will be saved to a new custom profile." + }, + "saveNew": "Save as new custom profile", + "save": "Save profile", + "info": { + "title": "Info", + "general": { + "title": "General settings", + "name": { + "text": "Name", + "info": "Set the name of this profile." + }, + "userLibrary": { + "text": "User library", + "info": "Select which user library to display to the device. Leave empty to inherit the default setting." + }, + "mediaTypes": { + "text": "Supported Media Types", + "audio": "Audio", + "video": "Video", + "photo": "Photo" + }, + "maxStreamQuality": { + "text": "Maximum streaming quality", + "info": "Specify a maximum bitrate when streaming." + }, + "musicTranscodeQuality": { + "text": "Music transcoding bitrate", + "info": "Specify a maximum bitrate when streaming music." + } + }, + "display": { + "title": "Display Settings", + "plainFolder": { + "text": "Display all folders as plain storage folders", + "info": "All folders are represented in DIDL as \"object.container.storageFolder\" instead of a more specific type, such as \"object.container.person.musicArtist\"." + }, + "plainVideo": { + "text": "Display all videos as plain video items", + "info": "All videos are represented in DIDL as \"object.item.videoItem\" instead of a more specific type, such as \"object.item.videoItem.movie\"." + } + }, + "image": { + "title": "Image Settings", + "albumMaxDimension": "Maximum resolution of album art exposed via the upnp:albumArtURI property.", + "iconMaxDimension": "Maximum resolution of icons exposed via the upnp:icon property.", + "embedDidl": { + "text": "Embed album art in Didl", + "info": "Some devices prefer this method for obtaining album art. Others may fail to play with this option enabled." + }, + "singleEmbed": { + "text": "Limit to single embedded image", + "info": "Some devices will not render properly if multiple images are embedded within Didl." + }, + "albumPN": { + "text": "Album art PN", + "info": "PN used for album art, within the dlna:profileID attribute on upnp:albumArtURI. Some devices require a specific value, regardless of the size of the image." + }, + "albumArtMaxWidth": "Album art max width", + "albumArtMaxHeight": "Album art max height", + "iconMaxWidth": "Icon maximum width", + "iconMaxHeight": "Icon maximum height" + } + }, + "identification": { + "title": "Identification", + "device": { + "title": "Device identification", + "info": "Enter at least one identification criteria.", + "infoText": "A case-insensitive substring or regex expression.", + "friendlyName": "Friendly name", + "manufacturer": "Manufacturer", + "manufacturerUrl": "Manufacturer URL", + "modelName": "Model name", + "modelNumber": "Model number", + "modelDescription": "Model description", + "modelUrl": "Model URL", + "serialNumber": "Serial number", + "deviceDescription": "Device description" + }, + "server": { + "title": "Server identification", + "info": "These values control how the server will present itself to clients.", + "friendlyName": "Friendly name", + "manufacturer": "Manufacturer", + "manufacturerUrl": "Manufacturer URL", + "modelName": "Model name", + "modelNumber": "Model number", + "modelDescription": "Model description", + "modelUrl": "Model URL", + "serialNumber": "Serial number", + "protocolInfo": { + "text": "Protocol info", + "info": "The value that will be used when responding to GetProtocolInfo requests from the device." + }, + "sonyAggregationFlags": { + "text": "Sony aggregation flags", + "info": "Determines the content of the aggreagationFlags element in the urn:schemas-sonycom:av namespace." + } + } + }, + "subtitle": { + "title": "Subtitle" + }, + "directPlay": { + "title": "Direct Play", + "text": "Add direct play profiles to indicate which formats the device can handle natively." + }, + "transcoding": { + "title": "Transcoding", + "text": "Add transcoding profiles to indicate which formats should be used when transcoding is required." + }, + "containers": { + "title": "Containers", + "text": "Container profiles indicate the limitations of a device when playing specific formats. If a limitation applies then the media will be transcoded, even if the format is configured for direct play." + }, + "codecs": { + "title": "Codecs", + "text": "Codec profiles indicate the limitations of a device when playing specific codecs. If a limitation applies then the media will be transcoded, even if the codec is configured for direct play." + }, + "responses": { + "title": "Responses", + "text": "Response profiles provide a way to customize information sent to the device when playing certain kinds of media." + }, + "xml": { + "title": "XML" + } + } + }, "devices": { "appName": "App name", "appVersion": "App version", diff --git a/frontend/pages/settings/dlna.vue b/frontend/pages/settings/dlna.vue new file mode 100644 index 00000000000..c9f41db5e92 --- /dev/null +++ b/frontend/pages/settings/dlna.vue @@ -0,0 +1,249 @@ + + + diff --git a/frontend/pages/settings/index.vue b/frontend/pages/settings/index.vue index 6c1ab67b66a..d8c18e49c25 100644 --- a/frontend/pages/settings/index.vue +++ b/frontend/pages/settings/index.vue @@ -191,7 +191,8 @@ export default Vue.extend({ { icon: 'mdi-dlna', name: this.$t('settingsSections.dlna.name'), - description: this.$t('settingsSections.dlna.description') + description: this.$t('settingsSections.dlna.description'), + link: 'settings/dlna' }, { icon: 'mdi-television-classic', From 8da21e2d4dac6f26fc42164ad921b8ad4a195b48 Mon Sep 17 00:00:00 2001 From: Martin Schmidt Date: Mon, 9 May 2022 14:31:07 +0200 Subject: [PATCH 2/5] feat(DLNA): loop through values, rename dlna profile editor --- .../components/System/DlnaProfileEditor.vue | 610 ++++++++++++ .../components/System/SelectedDlnaProfile.vue | 924 ------------------ frontend/locales/en-US.json | 101 +- frontend/pages/settings/dlna.vue | 6 +- 4 files changed, 664 insertions(+), 977 deletions(-) create mode 100644 frontend/components/System/DlnaProfileEditor.vue delete mode 100644 frontend/components/System/SelectedDlnaProfile.vue diff --git a/frontend/components/System/DlnaProfileEditor.vue b/frontend/components/System/DlnaProfileEditor.vue new file mode 100644 index 00000000000..8adbb614ed3 --- /dev/null +++ b/frontend/components/System/DlnaProfileEditor.vue @@ -0,0 +1,610 @@ + + + + + diff --git a/frontend/components/System/SelectedDlnaProfile.vue b/frontend/components/System/SelectedDlnaProfile.vue deleted file mode 100644 index 6106f87de82..00000000000 --- a/frontend/components/System/SelectedDlnaProfile.vue +++ /dev/null @@ -1,924 +0,0 @@ - - - - - diff --git a/frontend/locales/en-US.json b/frontend/locales/en-US.json index 6906ddd483f..6db6c99d805 100644 --- a/frontend/locales/en-US.json +++ b/frontend/locales/en-US.json @@ -381,9 +381,9 @@ }, "mediaTypes": { "text": "Supported Media Types", - "audio": "Audio", - "video": "Video", - "photo": "Photo" + "Audio": "Audio", + "Video": "Video", + "Photo": "Photo" }, "maxStreamQuality": { "text": "Maximum streaming quality", @@ -396,99 +396,100 @@ }, "display": { "title": "Display Settings", - "plainFolder": { + "RequiresPlainFolders": { "text": "Display all folders as plain storage folders", "info": "All folders are represented in DIDL as \"object.container.storageFolder\" instead of a more specific type, such as \"object.container.person.musicArtist\"." }, - "plainVideo": { + "RequiresPlainVideoItems": { "text": "Display all videos as plain video items", "info": "All videos are represented in DIDL as \"object.item.videoItem\" instead of a more specific type, such as \"object.item.videoItem.movie\"." } }, "image": { "title": "Image Settings", - "albumMaxDimension": "Maximum resolution of album art exposed via the upnp:albumArtURI property.", - "iconMaxDimension": "Maximum resolution of icons exposed via the upnp:icon property.", - "embedDidl": { + "EnableAlbumArtInDidl": { "text": "Embed album art in Didl", "info": "Some devices prefer this method for obtaining album art. Others may fail to play with this option enabled." }, - "singleEmbed": { + "EnableSingleAlbumArtLimit": { "text": "Limit to single embedded image", "info": "Some devices will not render properly if multiple images are embedded within Didl." }, - "albumPN": { + "AlbumArtPn": { "text": "Album art PN", "info": "PN used for album art, within the dlna:profileID attribute on upnp:albumArtURI. Some devices require a specific value, regardless of the size of the image." }, - "albumArtMaxWidth": "Album art max width", - "albumArtMaxHeight": "Album art max height", - "iconMaxWidth": "Icon maximum width", - "iconMaxHeight": "Icon maximum height" + "MaxAlbumArtWidth": { + "text": "Album art max width", + "info": "Maximum resolution of album art exposed via the upnp:albumArtURI property." + }, + "MaxAlbumArtHeight": { + "text": "Album art max height", + "info": "Maximum resolution of album art exposed via the upnp:albumArtURI property." + }, + "MaxIconWidth": { + "text": "Icon maximum width", + "info": "Maximum resolution of icons exposed via the upnp:icon property." + }, + "MaxIconHeight": { + "text": "Icon maximum height", + "info": "Maximum resolution of icons exposed via the upnp:icon property." + } } }, "identification": { "title": "Identification", + "FriendlyName": "Friendly name", + "Manufacturer": "Manufacturer", + "ManufacturerUrl": "Manufacturer URL", + "ModelName": "Model name", + "ModelNumber": "Model number", + "ModelDescription": "Model description", + "ModelUrl": "Model URL", + "SerialNumber": "Serial number", + "ProtocolInfo": "Protocol info", + "SonyAggregationFlags": "Sony aggregation flags", + "extra": { + "ProtocolInfo": "The value that will be used when responding to GetProtocolInfo requests from the device.", + "SonyAggregationFlags": "Determines the content of the aggreagationFlags element in the urn:schemas-sonycom:av namespace." + }, "device": { "title": "Device identification", "info": "Enter at least one identification criteria.", - "infoText": "A case-insensitive substring or regex expression.", - "friendlyName": "Friendly name", - "manufacturer": "Manufacturer", - "manufacturerUrl": "Manufacturer URL", - "modelName": "Model name", - "modelNumber": "Model number", - "modelDescription": "Model description", - "modelUrl": "Model URL", - "serialNumber": "Serial number", - "deviceDescription": "Device description" + "infoText": "A case-insensitive substring or regex expression." }, "server": { "title": "Server identification", - "info": "These values control how the server will present itself to clients.", - "friendlyName": "Friendly name", - "manufacturer": "Manufacturer", - "manufacturerUrl": "Manufacturer URL", - "modelName": "Model name", - "modelNumber": "Model number", - "modelDescription": "Model description", - "modelUrl": "Model URL", - "serialNumber": "Serial number", - "protocolInfo": { - "text": "Protocol info", - "info": "The value that will be used when responding to GetProtocolInfo requests from the device." - }, - "sonyAggregationFlags": { - "text": "Sony aggregation flags", - "info": "Determines the content of the aggreagationFlags element in the urn:schemas-sonycom:av namespace." - } + "info": "These values control how the server will present itself to clients." } }, - "subtitle": { - "title": "Subtitle" + "SubtitleProfiles": { + "title": "Subtitle", + "text": "Subtitle profiles describe the subtitle formats supported by the device." }, - "directPlay": { + "DirectPlayProfiles": { "title": "Direct Play", "text": "Add direct play profiles to indicate which formats the device can handle natively." }, - "transcoding": { + "TranscodingProfiles": { "title": "Transcoding", "text": "Add transcoding profiles to indicate which formats should be used when transcoding is required." }, - "containers": { + "ContainerProfiles": { "title": "Containers", "text": "Container profiles indicate the limitations of a device when playing specific formats. If a limitation applies then the media will be transcoded, even if the format is configured for direct play." }, - "codecs": { + "CodecProfiles": { "title": "Codecs", "text": "Codec profiles indicate the limitations of a device when playing specific codecs. If a limitation applies then the media will be transcoded, even if the codec is configured for direct play." }, - "responses": { + "ResponseProfiles": { "title": "Responses", "text": "Response profiles provide a way to customize information sent to the device when playing certain kinds of media." }, - "xml": { - "title": "XML" + "XmlRootAttributes": { + "title": "XML", + "text": "These attributes are applied to the root element of every XML response." } } }, diff --git a/frontend/pages/settings/dlna.vue b/frontend/pages/settings/dlna.vue index c9f41db5e92..414dfe81922 100644 --- a/frontend/pages/settings/dlna.vue +++ b/frontend/pages/settings/dlna.vue @@ -99,7 +99,7 @@ - Date: Sun, 15 May 2022 19:18:46 +0200 Subject: [PATCH 3/5] refactor(DLNA): loop though settings and allow editing --- .../components/System/DlnaEntryEditor.vue | 154 ++++++ .../components/System/DlnaProfileEditor.vue | 487 ++++++++---------- frontend/locales/en-US.json | 93 +++- frontend/pages/settings/dlna.vue | 35 +- 4 files changed, 452 insertions(+), 317 deletions(-) create mode 100644 frontend/components/System/DlnaEntryEditor.vue diff --git a/frontend/components/System/DlnaEntryEditor.vue b/frontend/components/System/DlnaEntryEditor.vue new file mode 100644 index 00000000000..d44c878a4bd --- /dev/null +++ b/frontend/components/System/DlnaEntryEditor.vue @@ -0,0 +1,154 @@ + + + + + diff --git a/frontend/components/System/DlnaProfileEditor.vue b/frontend/components/System/DlnaProfileEditor.vue index 8adbb614ed3..fbcda0e27a5 100644 --- a/frontend/components/System/DlnaProfileEditor.vue +++ b/frontend/components/System/DlnaProfileEditor.vue @@ -1,12 +1,11 @@ + + - - - - - {{ $t('settings.dlna.profile.xml.text') }} - - - @@ -330,10 +284,20 @@