From edbcd7c79e8e7693693b622887eea5872d373fd7 Mon Sep 17 00:00:00 2001 From: disgustipated Date: Wed, 12 Jun 2024 06:00:11 -0400 Subject: [PATCH 1/4] Set publisher uri to http so it wont be affected by published server uri --- src/Jellyfin.Plugin.Dlna/Main/DlnaHost.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Jellyfin.Plugin.Dlna/Main/DlnaHost.cs b/src/Jellyfin.Plugin.Dlna/Main/DlnaHost.cs index d8ec11b..631eb43 100644 --- a/src/Jellyfin.Plugin.Dlna/Main/DlnaHost.cs +++ b/src/Jellyfin.Plugin.Dlna/Main/DlnaHost.cs @@ -247,6 +247,8 @@ private void RegisterServerEndpoints() .Where(x => x.AddressFamily != AddressFamily.InterNetworkV6) .ToList(); + var httpBindPort = _appHost.HttpPort; + if (validInterfaces.Count == 0) { // No interfaces returned, fall back to loopback @@ -257,9 +259,11 @@ private void RegisterServerEndpoints() { var fullService = "urn:schemas-upnp-org:device:MediaServer:1"; - _logger.LogInformation("Registering publisher for {ResourceName} on {DeviceAddress}", fullService, intf.Address); + var uri = new UriBuilder(intf.Address + descriptorUri); + uri.Scheme = "http://"; + uri.Port = httpBindPort; - var uri = new UriBuilder(_appHost.GetApiUrlForLocalAccess(intf.Address, false) + descriptorUri); + _logger.LogInformation("Registering publisher for {ResourceName} on {DeviceAddress} with uri {fulluri}", fullService, intf.Address, uri); var device = new SsdpRootDevice { From ffa23657624df0da21011838787b4c2e10c85364 Mon Sep 17 00:00:00 2001 From: disgustipated Date: Wed, 12 Jun 2024 06:02:16 -0400 Subject: [PATCH 2/4] Remove . from friendlyname for identifying LG TVs --- src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml b/src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml index 06598ac..536f6d5 100644 --- a/src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml +++ b/src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml @@ -3,7 +3,7 @@ xmlns:xsd="http://www.w3.org/2001/XMLSchema"> LG Smart TV - LG.* + LG* From 362bd8e36d9a3a42856e813bfffa1e2209556db4 Mon Sep 17 00:00:00 2001 From: disgustipated Date: Wed, 2 Oct 2024 11:10:12 -0400 Subject: [PATCH 3/4] Add . back in to friendly name for LG TVs, caused rexeg to match unexpected friendly names of other devices --- src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml b/src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml index 536f6d5..06598ac 100644 --- a/src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml +++ b/src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml @@ -3,7 +3,7 @@ xmlns:xsd="http://www.w3.org/2001/XMLSchema"> LG Smart TV - LG* + LG.* From 38547b8eb810bd18623a1c75dc9cd90ca8c4570d Mon Sep 17 00:00:00 2001 From: disgustipated Date: Sat, 19 Oct 2024 12:02:01 -0400 Subject: [PATCH 4/4] Update src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml Just tested this and it resolves both issues, with it set like this it picks up my lg tv as well as not picking up a device with an L in it. It does pick up if the device is named with lg in it like playlger, so theres probably some more work that needs done to make this better but this resolves picking up anything with just an L in the name. Co-authored-by: Bond-009 --- src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml b/src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml index 06598ac..801bbdc 100644 --- a/src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml +++ b/src/Jellyfin.Plugin.Dlna/Profiles/Xml/LG Smart TV.xml @@ -3,7 +3,7 @@ xmlns:xsd="http://www.w3.org/2001/XMLSchema"> LG Smart TV - LG.* + LG