aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-01-19 14:54:07 -0500
committerLuke <luke.pulverenti@gmail.com>2016-01-19 14:54:07 -0500
commit236b5caee2797d4a8af857cea2f3859bc94d3948 (patch)
tree210242ec629d84baa9811dacdad3931a4e5c7b35 /MediaBrowser.Common.Implementations/Updates/InstallationManager.cs
parente951dd20d95c81da29d4f9d8a2cb927e7639518b (diff)
parenta5d54256ffb79dd1d0a06df0536f772bbeff9d3d (diff)
Merge pull request #1409 from MediaBrowser/beta
merge from beta
Diffstat (limited to 'MediaBrowser.Common.Implementations/Updates/InstallationManager.cs')
-rw-r--r--MediaBrowser.Common.Implementations/Updates/InstallationManager.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs b/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs
index 6d68b968b..8e0df9005 100644
--- a/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs
+++ b/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs
@@ -437,11 +437,12 @@ namespace MediaBrowser.Common.Implementations.Updates
/// Installs the package.
/// </summary>
/// <param name="package">The package.</param>
+ /// <param name="isPlugin">if set to <c>true</c> [is plugin].</param>
/// <param name="progress">The progress.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
/// <exception cref="System.ArgumentNullException">package</exception>
- public async Task InstallPackage(PackageVersionInfo package, IProgress<double> progress, CancellationToken cancellationToken)
+ public async Task InstallPackage(PackageVersionInfo package, bool isPlugin, IProgress<double> progress, CancellationToken cancellationToken)
{
if (package == null)
{
@@ -494,7 +495,7 @@ namespace MediaBrowser.Common.Implementations.Updates
try
{
- await InstallPackageInternal(package, innerProgress, linkedToken).ConfigureAwait(false);
+ await InstallPackageInternal(package, isPlugin, innerProgress, linkedToken).ConfigureAwait(false);
lock (CurrentInstallations)
{
@@ -550,18 +551,17 @@ namespace MediaBrowser.Common.Implementations.Updates
/// Installs the package internal.
/// </summary>
/// <param name="package">The package.</param>
+ /// <param name="isPlugin">if set to <c>true</c> [is plugin].</param>
/// <param name="progress">The progress.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
- private async Task InstallPackageInternal(PackageVersionInfo package, IProgress<double> progress, CancellationToken cancellationToken)
+ private async Task InstallPackageInternal(PackageVersionInfo package, bool isPlugin, IProgress<double> progress, CancellationToken cancellationToken)
{
// Do the install
await PerformPackageInstallation(progress, package, cancellationToken).ConfigureAwait(false);
- var extension = Path.GetExtension(package.targetFilename) ?? "";
-
// Do plugin-specific processing
- if (!string.Equals(extension, ".zip", StringComparison.OrdinalIgnoreCase) && !string.Equals(extension, ".rar", StringComparison.OrdinalIgnoreCase) && !string.Equals(extension, ".7z", StringComparison.OrdinalIgnoreCase))
+ if (isPlugin)
{
// Set last update time if we were installed before
var plugin = _applicationHost.Plugins.FirstOrDefault(p => string.Equals(p.Id.ToString(), package.guid, StringComparison.OrdinalIgnoreCase))