diff options
| author | Anthony Lavado <anthony@lavado.ca> | 2020-05-26 12:20:42 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-26 12:20:42 -0400 |
| commit | 9c00226f11ee6d99e3e8f83a3a531e70d743e6ba (patch) | |
| tree | 6631a13825d74f6ea772d6b150146b75f1560761 /Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs | |
| parent | 976ae36bea0768f0e363bf0c5091b0853cc81c4d (diff) | |
| parent | 09915363c2d5f2febed41e803476c7ec6049a06e (diff) | |
Merge pull request #3033 from neilsb/autodiscover-url-override
Allow override of address published by auto discovery
Diffstat (limited to 'Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs')
| -rw-r--r-- | Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs index 50ba0f8fa..6929c81f9 100644 --- a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs +++ b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs @@ -3,6 +3,7 @@ using System.Threading.Tasks; using Emby.Server.Implementations.Udp; using MediaBrowser.Controller; using MediaBrowser.Controller.Plugins; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; namespace Emby.Server.Implementations.EntryPoints @@ -22,6 +23,7 @@ namespace Emby.Server.Implementations.EntryPoints /// </summary> private readonly ILogger _logger; private readonly IServerApplicationHost _appHost; + private readonly IConfiguration _config; /// <summary> /// The UDP server. @@ -35,18 +37,19 @@ namespace Emby.Server.Implementations.EntryPoints /// </summary> public UdpServerEntryPoint( ILogger<UdpServerEntryPoint> logger, - IServerApplicationHost appHost) + IServerApplicationHost appHost, + IConfiguration configuration) { _logger = logger; _appHost = appHost; - + _config = configuration; } /// <inheritdoc /> public async Task RunAsync() { - _udpServer = new UdpServer(_logger, _appHost); + _udpServer = new UdpServer(_logger, _appHost, _config); _udpServer.Start(PortNumber, _cancellationTokenSource.Token); } |
