aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Startup.cs
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2024-01-06 15:34:09 -0500
committerGitHub <noreply@github.com>2024-01-06 13:34:09 -0700
commit43b32b0d94d4deef49bbca735dc50447acdb9250 (patch)
tree4f02c093c3f78945e668146b8cd9a58de2b599aa /Jellyfin.Server/Startup.cs
parent82f93afa22c9695f960903f7b90c7a2c8b23af74 (diff)
Auto Discovery Cleanup (#10793)
* Call GetSmartApiUrl directly in UdpServer.RespondToV2Message GetSmartApiUrl already returns PublishedServerUrl if set. * Rewrite auto discovery using UdpClient and BackgroundService * Respect network address settings in AutoDiscoveryHost * Always listen on broadcast address in Linux for auto-discovery * Await udp server tasks in AutoDiscoveryHost * Only bind to broadcast addresses for IPv4 * Only bind to broadcast if IPv4 is enabled
Diffstat (limited to 'Jellyfin.Server/Startup.cs')
-rw-r--r--Jellyfin.Server/Startup.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Jellyfin.Server/Startup.cs b/Jellyfin.Server/Startup.cs
index aa7be9109..1030c6f5f 100644
--- a/Jellyfin.Server/Startup.cs
+++ b/Jellyfin.Server/Startup.cs
@@ -6,6 +6,7 @@ using System.Net.Mime;
using System.Text;
using Jellyfin.Api.Middleware;
using Jellyfin.MediaEncoding.Hls.Extensions;
+using Jellyfin.Networking;
using Jellyfin.Networking.HappyEyeballs;
using Jellyfin.Server.Extensions;
using Jellyfin.Server.HealthChecks;
@@ -13,7 +14,6 @@ using Jellyfin.Server.Implementations;
using Jellyfin.Server.Implementations.Extensions;
using Jellyfin.Server.Infrastructure;
using MediaBrowser.Common.Net;
-using MediaBrowser.Controller;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Extensions;
using Microsoft.AspNetCore.Builder;
@@ -121,6 +121,8 @@ namespace Jellyfin.Server
.AddCheck<DbContextFactoryHealthCheck<JellyfinDbContext>>(nameof(JellyfinDbContext));
services.AddHlsPlaylistGenerator();
+
+ services.AddHostedService<AutoDiscoveryHost>();
}
/// <summary>