aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/PluginService.cs
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2020-01-08 01:21:09 +0900
committerdkanada <dkanada@users.noreply.github.com>2020-01-08 01:21:09 +0900
commitaca31457c06ea13042accd60e27ab61208a51577 (patch)
treeb734310d099f9b896ccce0b200ab96a3786d168b /MediaBrowser.Api/PluginService.cs
parentdee247453e7b5cab1badb6a844af690cdf80aacd (diff)
parent0b592376d59d10d14dbdd248c24f7ec6397c3508 (diff)
merge branch master into media-attachments
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;