diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-02-06 13:04:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-06 13:04:07 +0100 |
| commit | 0a43814596cc6df1a2bb9f8e9cd1967d9cf3abbd (patch) | |
| tree | 86326b10bac7bc27b28980b4c08f43b34f54904d /Emby.Server.Implementations/ApplicationHost.cs | |
| parent | 3fe84c3213b8340f86aec0c5c488f7fc303b26cc (diff) | |
| parent | df739b5b2fc4b8f8cd9068326b01e7b8eb806c43 (diff) | |
Merge branch 'master' into sessionmanager
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index e93337c2f..4cc82f726 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) { @@ -1018,7 +1018,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(); @@ -1718,29 +1718,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) |
