aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ApplicationHost.cs
diff options
context:
space:
mode:
authorClaus Vium <cvium@users.noreply.github.com>2020-02-03 13:51:34 +0100
committerGitHub <noreply@github.com>2020-02-03 13:51:34 +0100
commit241e351a6128aeaf594e8fefe2da244970c24954 (patch)
tree6f8957265ebb56eee8a4bbdf81df624cd3a6302d /Emby.Server.Implementations/ApplicationHost.cs
parentd69870680b9a12118b2e5b5e9944c91b886a12c9 (diff)
parentb7a9900556d2fb316f0ea9d96e561bebb5332257 (diff)
Merge branch 'master' into dlnawarnings
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs27
1 files changed, 2 insertions, 25 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 0bb1d832fb..e2df8877ab 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -599,7 +599,7 @@ namespace Emby.Server.Implementations
HttpsPort = ServerConfiguration.DefaultHttpsPort;
}
- JsonSerializer = new JsonSerializer(FileSystemManager);
+ JsonSerializer = new JsonSerializer();
if (Plugins != null)
{
@@ -1007,7 +1007,7 @@ namespace Emby.Server.Implementations
{
string dir = Path.Combine(ApplicationPaths.PluginsPath, args.Argument.name);
var types = Directory.EnumerateFiles(dir, "*.dll", SearchOption.AllDirectories)
- .Select(x => Assembly.LoadFrom(x))
+ .Select(Assembly.LoadFrom)
.SelectMany(x => x.ExportedTypes)
.Where(x => x.IsClass && !x.IsAbstract && !x.IsInterface && !x.IsGenericType)
.ToArray();
@@ -1707,29 +1707,6 @@ namespace Emby.Server.Implementations
_plugins = list.ToArray();
}
- /// <summary>
- /// This returns localhost in the case of no external dns, and the hostname if the
- /// dns is prefixed with a valid Uri prefix.
- /// </summary>
- /// <param name="externalDns">The external dns prefix to get the hostname of.</param>
- /// <returns>The hostname in <paramref name="externalDns"/>.</returns>
- private static string GetHostnameFromExternalDns(string externalDns)
- {
- if (string.IsNullOrEmpty(externalDns))
- {
- return "localhost";
- }
-
- try
- {
- return new Uri(externalDns).Host;
- }
- catch
- {
- return externalDns;
- }
- }
-
public virtual void LaunchUrl(string url)
{
if (!CanLaunchWebBrowser)