From 65a0ca2f32e2eba640fbfead46ffb5bfd02e2c88 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Fri, 14 Jun 2019 18:38:14 +0200 Subject: Improvements to InstallationManager --- MediaBrowser.Api/PackageService.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'MediaBrowser.Api/PackageService.cs') diff --git a/MediaBrowser.Api/PackageService.cs b/MediaBrowser.Api/PackageService.cs index fbb876dea..cf1e08d53 100644 --- a/MediaBrowser.Api/PackageService.cs +++ b/MediaBrowser.Api/PackageService.cs @@ -197,7 +197,7 @@ namespace MediaBrowser.Api throw new ResourceNotFoundException(string.Format("Package not found: {0}", request.Name)); } - await _installationManager.InstallPackage(package, true, new SimpleProgress(), CancellationToken.None); + await _installationManager.InstallPackage(package, new SimpleProgress(), CancellationToken.None); } /// @@ -206,13 +206,7 @@ namespace MediaBrowser.Api /// The request. public void Delete(CancelPackageInstallation request) { - var info = _installationManager.CurrentInstallations.FirstOrDefault(i => i.Item1.Id.Equals(request.Id)); - - if (info != null) - { - info.Item2.Cancel(); - } + _installationManager.CancelInstallation(new Guid(request.Id)); } } - } -- cgit v1.2.3