mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 17:14:42 +01:00
Moved all settings across to network.xml
This commit is contained in:
@@ -8,6 +8,7 @@ using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Jellyfin.Data.Events;
|
||||
using Jellyfin.Networking.Configuration;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Plugins;
|
||||
@@ -56,7 +57,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
private string GetConfigIdentifier()
|
||||
{
|
||||
const char Separator = '|';
|
||||
var config = _config.Configuration;
|
||||
var config = _config.GetNetworkConfiguration();
|
||||
|
||||
return new StringBuilder(32)
|
||||
.Append(config.EnableUPnP).Append(Separator)
|
||||
@@ -93,7 +94,8 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (!_config.Configuration.EnableUPnP || !_config.Configuration.EnableRemoteAccess)
|
||||
var config = _config.GetNetworkConfiguration();
|
||||
if (!config.EnableUPnP || !config.EnableRemoteAccess)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -156,11 +158,12 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
|
||||
private IEnumerable<Task> CreatePortMaps(INatDevice device)
|
||||
{
|
||||
yield return CreatePortMap(device, _appHost.HttpPort, _config.Configuration.PublicPort);
|
||||
var config = _config.GetNetworkConfiguration();
|
||||
yield return CreatePortMap(device, _appHost.HttpPort, config.PublicPort);
|
||||
|
||||
if (_appHost.ListenWithHttps)
|
||||
{
|
||||
yield return CreatePortMap(device, _appHost.HttpsPort, _config.Configuration.PublicHttpsPort);
|
||||
yield return CreatePortMap(device, _appHost.HttpsPort, config.PublicHttpsPort);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user