aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Server')
-rw-r--r--Jellyfin.Server/Migrations/IMigrationRoutine.cs1
-rw-r--r--Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs1
-rw-r--r--Jellyfin.Server/Program.cs4
-rw-r--r--Jellyfin.Server/StartupOptions.cs12
4 files changed, 14 insertions, 4 deletions
diff --git a/Jellyfin.Server/Migrations/IMigrationRoutine.cs b/Jellyfin.Server/Migrations/IMigrationRoutine.cs
index b79fdeac03..6b5780a262 100644
--- a/Jellyfin.Server/Migrations/IMigrationRoutine.cs
+++ b/Jellyfin.Server/Migrations/IMigrationRoutine.cs
@@ -1,5 +1,4 @@
using System;
-using Microsoft.Extensions.Logging;
namespace Jellyfin.Server.Migrations
{
diff --git a/Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs b/Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs
index 89514c89b7..b15e092906 100644
--- a/Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs
+++ b/Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using MediaBrowser.Common.Configuration;
-using Microsoft.Extensions.Logging;
using Newtonsoft.Json.Linq;
namespace Jellyfin.Server.Migrations.Routines
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index b9895386f5..7c693f8c39 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -40,12 +40,12 @@ namespace Jellyfin.Server
/// <summary>
/// The name of logging configuration file containing application defaults.
/// </summary>
- public static readonly string LoggingConfigFileDefault = "logging.default.json";
+ public const string LoggingConfigFileDefault = "logging.default.json";
/// <summary>
/// The name of the logging configuration file containing the system-specific override settings.
/// </summary>
- public static readonly string LoggingConfigFileSystem = "logging.json";
+ public const string LoggingConfigFileSystem = "logging.json";
private static readonly CancellationTokenSource _tokenSource = new CancellationTokenSource();
private static readonly ILoggerFactory _loggerFactory = new SerilogLoggerFactory();
diff --git a/Jellyfin.Server/StartupOptions.cs b/Jellyfin.Server/StartupOptions.cs
index 6e15d058fc..cc250b06e2 100644
--- a/Jellyfin.Server/StartupOptions.cs
+++ b/Jellyfin.Server/StartupOptions.cs
@@ -1,6 +1,9 @@
+using System;
using System.Collections.Generic;
using CommandLine;
using Emby.Server.Implementations;
+using Emby.Server.Implementations.EntryPoints;
+using Emby.Server.Implementations.Udp;
using Emby.Server.Implementations.Updates;
using MediaBrowser.Controller.Extensions;
@@ -80,6 +83,10 @@ namespace Jellyfin.Server
[Option("plugin-manifest-url", Required = false, HelpText = "A custom URL for the plugin repository JSON manifest")]
public string? PluginManifestUrl { get; set; }
+ /// <inheritdoc />
+ [Option("published-server-url", Required = false, HelpText = "Jellyfin Server URL to publish via auto discover process")]
+ public Uri? PublishedServerUrl { get; set; }
+
/// <summary>
/// Gets the command line options as a dictionary that can be used in the .NET configuration system.
/// </summary>
@@ -98,6 +105,11 @@ namespace Jellyfin.Server
config.Add(ConfigurationExtensions.HostWebClientKey, bool.FalseString);
}
+ if (PublishedServerUrl != null)
+ {
+ config.Add(UdpServer.AddressOverrideConfigKey, PublishedServerUrl.ToString());
+ }
+
return config;
}
}