diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
index cd2a7dcf06..dc1a56e271 100644
--- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
+++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
@@ -7,7 +7,6 @@ using System.Net.Sockets;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
-using Emby.Server.Implementations.Configuration;
using Emby.Server.Implementations.Net;
using Emby.Server.Implementations.Services;
using MediaBrowser.Common.Extensions;
@@ -16,7 +15,6 @@ using MediaBrowser.Controller;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Net;
using MediaBrowser.Model.Events;
-using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.Services;
using Microsoft.AspNetCore.Http;
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs
index 7dca7e8147..a5d65a7160 100644
--- a/MediaBrowser.Api/ApiEntryPoint.cs
+++ b/MediaBrowser.Api/ApiEntryPoint.cs
@@ -40,14 +40,13 @@ namespace MediaBrowser.Api
internal IHttpResultFactory ResultFactory { get; private set; }
///
- /// The application paths
+ /// Gets the configuration manager.
///
- private readonly IServerConfigurationManager _config;
+ internal IServerConfigurationManager ConfigurationManager { get; }
private readonly ISessionManager _sessionManager;
private readonly IFileSystem _fileSystem;
private readonly IMediaSourceManager _mediaSourceManager;
- public readonly IProcessFactory ProcessFactory;
///
/// The active transcoding jobs
@@ -73,15 +72,13 @@ namespace MediaBrowser.Api
IServerConfigurationManager config,
IFileSystem fileSystem,
IMediaSourceManager mediaSourceManager,
- IProcessFactory processFactory,
IHttpResultFactory resultFactory)
{
Logger = logger;
_sessionManager = sessionManager;
- _config = config;
+ ConfigurationManager = config;
_fileSystem = fileSystem;
_mediaSourceManager = mediaSourceManager;
- ProcessFactory = processFactory;
ResultFactory = resultFactory;
_sessionManager.PlaybackProgress += _sessionManager_PlaybackProgress;
@@ -162,7 +159,7 @@ namespace MediaBrowser.Api
public EncodingOptions GetEncodingOptions()
{
- return ConfigurationManagerExtensions.GetConfiguration(_config, "encoding");
+ return ConfigurationManagerExtensions.GetConfiguration(ConfigurationManager, "encoding");
}
///
@@ -170,7 +167,7 @@ namespace MediaBrowser.Api
///
private void DeleteEncodedMediaCache()
{
- var path = _config.ApplicationPaths.GetTranscodingTempPath();
+ var path = ConfigurationManager.ApplicationPaths.GetTranscodingTempPath();
if (!Directory.Exists(path))
{
diff --git a/MediaBrowser.Api/BaseApiService.cs b/MediaBrowser.Api/BaseApiService.cs
index 49f8c6ace0..328bda50fc 100644
--- a/MediaBrowser.Api/BaseApiService.cs
+++ b/MediaBrowser.Api/BaseApiService.cs
@@ -299,8 +299,9 @@ namespace MediaBrowser.Api
var first = pathInfo[0];
// backwards compatibility
- if (string.Equals(first, "mediabrowser", StringComparison.OrdinalIgnoreCase) ||
- string.Equals(first, "emby", StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(first, "mediabrowser", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(first, "emby", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(first, ApiEntryPoint.Instance.ConfigurationManager.Configuration.BaseUrl))
{
index++;
}