diff options
| author | Bond_009 <bond.009@outlook.com> | 2022-02-14 14:39:33 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2022-02-14 14:39:33 +0100 |
| commit | 3cb49d6df005df12c2d626bcdfc708c353855f8e (patch) | |
| tree | 6d51e01c5ac4bbf8a684f305a6337835fe544dff /Emby.Server.Implementations/Udp | |
| parent | 68e7072698dafe7df1bd272df331c2ccc8134391 (diff) | |
Fix option to disable server discovery
Diffstat (limited to 'Emby.Server.Implementations/Udp')
| -rw-r--r-- | Emby.Server.Implementations/Udp/UdpServer.cs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/Udp/UdpServer.cs b/Emby.Server.Implementations/Udp/UdpServer.cs index c8ab99de4..937e792f5 100644 --- a/Emby.Server.Implementations/Udp/UdpServer.cs +++ b/Emby.Server.Implementations/Udp/UdpServer.cs @@ -9,6 +9,7 @@ using MediaBrowser.Controller; using MediaBrowser.Model.ApiClient; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; +using static MediaBrowser.Controller.Extensions.ConfigurationExtensions; namespace Emby.Server.Implementations.Udp { @@ -18,11 +19,6 @@ namespace Emby.Server.Implementations.Udp public sealed class UdpServer : IDisposable { /// <summary> - /// Address Override Configuration Key. - /// </summary> - public const string AddressOverrideConfigKey = "PublishedServerUrl"; - - /// <summary> /// The _logger. /// </summary> private readonly ILogger _logger; @@ -60,7 +56,7 @@ namespace Emby.Server.Implementations.Udp private async Task RespondToV2Message(EndPoint endpoint, CancellationToken cancellationToken) { - string? localUrl = _config[AddressOverrideConfigKey]; + string? localUrl = _config[AddressOverrideKey]; if (string.IsNullOrEmpty(localUrl)) { localUrl = _appHost.GetSmartApiUrl(((IPEndPoint)endpoint).Address); @@ -68,7 +64,7 @@ namespace Emby.Server.Implementations.Udp if (string.IsNullOrEmpty(localUrl)) { - _logger.LogWarning("Unable to respond to udp request because the local ip address could not be determined."); + _logger.LogWarning("Unable to respond to server discovery request because the local ip address could not be determined."); return; } |
