aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
authorGreenback <jimcartlidge@yahoo.co.uk>2020-11-21 13:27:27 +0000
committerGreenback <jimcartlidge@yahoo.co.uk>2020-11-21 13:27:27 +0000
commit616caca2b7a936b1f7ed4d94ec0ad5a10f4a78df (patch)
treeba436cacc243f3e82e66b6aaf55ae0480e4df44a /Emby.Server.Implementations
parent7a6063ed41bb75ce087ceb38279426fed025b1ff (diff)
Added more comments.
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs7
-rw-r--r--Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs3
2 files changed, 8 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 418f634be..aff67f163 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -271,9 +271,10 @@ namespace Emby.Server.Implementations
_fileSystemManager = fileSystem;
ConfigurationManager = new ServerConfigurationManager(ApplicationPaths, LoggerFactory, _xmlSerializer, _fileSystemManager);
+ // Have to migrate settings here as migration subsystem not yet initialised.
MigrateNetworkConfiguration();
- // Have to pre-register the NetworkConfigurationFactory.
+ // Have to pre-register the NetworkConfigurationFactory, as the configuration sub-system is not yet initialised.
ConfigurationManager.RegisterConfiguration<NetworkConfigurationFactory>();
NetManager = new NetworkManager((IServerConfigurationManager)ConfigurationManager, LoggerFactory.CreateLogger<NetworkManager>());
@@ -301,6 +302,10 @@ namespace Emby.Server.Implementations
ApplicationUserAgent = Name.Replace(' ', '-') + "/" + ApplicationVersionString;
}
+ /// <summary>
+ /// Temporary function to migration network settings out of system.xml and into network.xml.
+ /// TODO: remove at the point when a fixed migration path has been decided upon.
+ /// </summary>
private void MigrateNetworkConfiguration()
{
string path = Path.Combine(ConfigurationManager.CommonApplicationPaths.ConfigurationDirectoryPath, "network.xml");
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs
index b092ffd6e..2eda1ab8b 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs
@@ -54,6 +54,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
/// <summary>
/// Returns an unused UDP port number in the range specified.
+ /// Temporarily placed here until future network PR merged.
/// </summary>
/// <param name="range">Upper and Lower boundary of ports to select.</param>
/// <returns>System.Int32.</returns>
@@ -78,7 +79,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
var mediaSource = OriginalMediaSource;
var uri = new Uri(mediaSource.Path);
- // Temporary Code to reduce PR size.
+ // Temporary code to reduce PR size. This will be updated by a future network pr.
var localPort = GetUdpPortFromRange((49152, 65535));
Directory.CreateDirectory(Path.GetDirectoryName(TempFilePath));