Skip to content

Commit

Permalink
Set publisher uri to http (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
disgustipated authored Jun 16, 2024
1 parent 2f94439 commit 539b970
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Jellyfin.Plugin.Dlna/Main/DlnaHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
{
Expand Down

0 comments on commit 539b970

Please sign in to comment.