diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-06-14 18:38:14 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2019-06-14 18:38:14 +0200 |
| commit | 65a0ca2f32e2eba640fbfead46ffb5bfd02e2c88 (patch) | |
| tree | d8bb72bbffbdef4a12901baf69198ae8fdc98f0e /MediaBrowser.Api | |
| parent | d4a42a1680a48cba0d87fac0808180e68072baab (diff) | |
Improvements to InstallationManager
Diffstat (limited to 'MediaBrowser.Api')
| -rw-r--r-- | MediaBrowser.Api/PackageService.cs | 10 |
1 files changed, 2 insertions, 8 deletions
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<double>(), CancellationToken.None); + await _installationManager.InstallPackage(package, new SimpleProgress<double>(), CancellationToken.None); } /// <summary> @@ -206,13 +206,7 @@ namespace MediaBrowser.Api /// <param name="request">The request.</param> 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)); } } - } |
