aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Updates
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2021-12-18 17:49:33 +0100
committerBond_009 <bond.009@outlook.com>2021-12-18 17:52:38 +0100
commita4565da4a998cfaa5bb8ff9d96d3d62b25574a90 (patch)
tree6cba2cfc8abf16c92011d9693aa9475c3958a040 /Emby.Server.Implementations/Updates
parent923720c988ce62ce5c57337252cf981ceeef9a23 (diff)
Use System.IO.Compression instead of SharpCompress for zips
Also removes unused methods from ZipClient
Diffstat (limited to 'Emby.Server.Implementations/Updates')
-rw-r--r--Emby.Server.Implementations/Updates/InstallationManager.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs
index ef95ebf94..7f7eec7d9 100644
--- a/Emby.Server.Implementations/Updates/InstallationManager.cs
+++ b/Emby.Server.Implementations/Updates/InstallationManager.cs
@@ -2,6 +2,7 @@ using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
+using System.IO.Compression;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Json;
@@ -47,7 +48,6 @@ namespace Emby.Server.Implementations.Updates
/// </summary>
/// <value>The application host.</value>
private readonly IServerApplicationHost _applicationHost;
- private readonly IZipClient _zipClient;
private readonly object _currentInstallationsLock = new object();
/// <summary>
@@ -69,7 +69,6 @@ namespace Emby.Server.Implementations.Updates
/// <param name="eventManager">The <see cref="IEventManager"/>.</param>
/// <param name="httpClientFactory">The <see cref="IHttpClientFactory"/>.</param>
/// <param name="config">The <see cref="IServerConfigurationManager"/>.</param>
- /// <param name="zipClient">The <see cref="IZipClient"/>.</param>
/// <param name="pluginManager">The <see cref="IPluginManager"/>.</param>
public InstallationManager(
ILogger<InstallationManager> logger,
@@ -78,7 +77,6 @@ namespace Emby.Server.Implementations.Updates
IEventManager eventManager,
IHttpClientFactory httpClientFactory,
IServerConfigurationManager config,
- IZipClient zipClient,
IPluginManager pluginManager)
{
_currentInstallations = new List<(InstallationInfo, CancellationTokenSource)>();
@@ -90,7 +88,6 @@ namespace Emby.Server.Implementations.Updates
_eventManager = eventManager;
_httpClientFactory = httpClientFactory;
_config = config;
- _zipClient = zipClient;
_jsonSerializerOptions = JsonDefaults.Options;
_pluginManager = pluginManager;
}
@@ -560,7 +557,8 @@ namespace Emby.Server.Implementations.Updates
}
stream.Position = 0;
- _zipClient.ExtractAllFromZip(stream, targetDir, true);
+ using var reader = new ZipArchive(stream);
+ reader.ExtractToDirectory(targetDir, true);
await _pluginManager.GenerateManifest(package.PackageInfo, package.Version, targetDir, status).ConfigureAwait(false);
_pluginManager.ImportPluginFrom(targetDir);
}