aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/PluginService.cs
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2019-12-10 22:11:32 +0900
committerGitHub <noreply@github.com>2019-12-10 22:11:32 +0900
commitb5d0bd0d764982c8df2c341c1f38c4d0636409c3 (patch)
treebaf1619a8fdb663d571d06f00b2fbbd5e8d0947a /MediaBrowser.Api/PluginService.cs
parent1b5da55ae554176f272b956402671170cce3817b (diff)
parent5f6bca8aeb23064a2d81c25d72ae317364959232 (diff)
Merge pull request #2020 from Bond-009/baseurl
Add support for multi segment base urls
Diffstat (limited to 'MediaBrowser.Api/PluginService.cs')
-rw-r--r--MediaBrowser.Api/PluginService.cs27
1 files changed, 10 insertions, 17 deletions
diff --git a/MediaBrowser.Api/PluginService.cs b/MediaBrowser.Api/PluginService.cs
index af61887b2..16d3268b9 100644
--- a/MediaBrowser.Api/PluginService.cs
+++ b/MediaBrowser.Api/PluginService.cs
@@ -3,14 +3,14 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
using MediaBrowser.Common;
-using MediaBrowser.Common.Net;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Common.Updates;
-using MediaBrowser.Controller.Devices;
+using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Net;
using MediaBrowser.Model.Plugins;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.Services;
+using Microsoft.Extensions.Logging;
namespace MediaBrowser.Api
{
@@ -150,25 +150,18 @@ namespace MediaBrowser.Api
/// </summary>
private readonly IApplicationHost _appHost;
private readonly IInstallationManager _installationManager;
- private readonly INetworkManager _network;
- private readonly IDeviceManager _deviceManager;
- public PluginService(IJsonSerializer jsonSerializer,
+ public PluginService(
+ ILogger<PluginService> logger,
+ IServerConfigurationManager serverConfigurationManager,
+ IHttpResultFactory httpResultFactory,
+ IJsonSerializer jsonSerializer,
IApplicationHost appHost,
- IInstallationManager installationManager,
- INetworkManager network,
- IDeviceManager deviceManager)
- : base()
+ IInstallationManager installationManager)
+ : base(logger, serverConfigurationManager, httpResultFactory)
{
- if (jsonSerializer == null)
- {
- throw new ArgumentNullException(nameof(jsonSerializer));
- }
-
_appHost = appHost;
_installationManager = installationManager;
- _network = network;
- _deviceManager = deviceManager;
_jsonSerializer = jsonSerializer;
}
@@ -248,7 +241,7 @@ namespace MediaBrowser.Api
{
// We need to parse this manually because we told service stack not to with IRequiresRequestStream
// https://code.google.com/p/servicestack/source/browse/trunk/Common/ServiceStack.Text/ServiceStack.Text/Controller/PathInfo.cs
- var id = new Guid(GetPathValue(1));
+ var id = Guid.Parse(GetPathValue(1));
var plugin = _appHost.Plugins.First(p => p.Id == id) as IHasPluginConfiguration;