aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs4
-rw-r--r--Emby.Server.Implementations/Updates/InstallationManager.cs21
-rw-r--r--MediaBrowser.Model/Updates/CheckForUpdateResult.cs29
-rw-r--r--MediaBrowser.Model/Updates/InstallationInfo.cs12
-rw-r--r--MediaBrowser.Model/Updates/PackageInfo.cs12
-rw-r--r--MediaBrowser.Model/Updates/VersionInfo.cs8
6 files changed, 16 insertions, 70 deletions
diff --git a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs
index 0f0b8b97b..f60fdea84 100644
--- a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs
+++ b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs
@@ -433,7 +433,7 @@ namespace Emby.Server.Implementations.Activity
ShortOverview = string.Format(
CultureInfo.InvariantCulture,
_localization.GetLocalizedString("VersionNumber"),
- e.Argument.Item2.versionString),
+ e.Argument.Item2.version),
Overview = e.Argument.Item2.description
});
}
@@ -462,7 +462,7 @@ namespace Emby.Server.Implementations.Activity
ShortOverview = string.Format(
CultureInfo.InvariantCulture,
_localization.GetLocalizedString("VersionNumber"),
- e.Argument.versionString)
+ e.Argument.version)
});
}
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs
index a00dec4c3..ffb6b5cbc 100644
--- a/Emby.Server.Implementations/Updates/InstallationManager.cs
+++ b/Emby.Server.Implementations/Updates/InstallationManager.cs
@@ -158,10 +158,10 @@ namespace Emby.Server.Implementations.Updates
if (minVersion != null)
{
- availableVersions = availableVersions.Where(x => x.versionCode >= minVersion);
+ availableVersions = availableVersions.Where(x => x.version >= minVersion);
}
- return availableVersions.OrderByDescending(x => x.versionCode);
+ return availableVersions.OrderByDescending(x => x.version);
}
/// <inheritdoc />
@@ -193,9 +193,9 @@ namespace Emby.Server.Implementations.Updates
foreach (var plugin in _applicationHost.Plugins)
{
var compatibleVersions = GetCompatibleVersions(catalog, plugin.Name, plugin.Id, plugin.Version);
- var version = compatibleVersions.FirstOrDefault(y => y.versionCode > plugin.Version);
+ var version = compatibleVersions.FirstOrDefault(y => y.version > plugin.Version);
if (version != null
- && !CompletedInstallations.Any(x => string.Equals(x.AssemblyGuid, version.guid, StringComparison.OrdinalIgnoreCase)))
+ && !CompletedInstallations.Any(x => string.Equals(x.Guid, version.guid, StringComparison.OrdinalIgnoreCase)))
{
yield return version;
}
@@ -212,10 +212,9 @@ namespace Emby.Server.Implementations.Updates
var installationInfo = new InstallationInfo
{
- Id = Guid.NewGuid(),
+ Guid = package.guid,
Name = package.name,
- AssemblyGuid = package.guid,
- Version = package.versionString
+ Version = package.version.ToString()
};
var innerCancellationTokenSource = new CancellationTokenSource();
@@ -258,7 +257,7 @@ namespace Emby.Server.Implementations.Updates
_currentInstallations.Remove(tuple);
}
- _logger.LogInformation("Package installation cancelled: {0} {1}", package.name, package.versionString);
+ _logger.LogInformation("Package installation cancelled: {0} {1}", package.name, package.version);
PackageInstallationCancelled?.Invoke(this, installationEventArgs);
@@ -306,13 +305,13 @@ namespace Emby.Server.Implementations.Updates
// Do plugin-specific processing
if (plugin == null)
{
- _logger.LogInformation("New plugin installed: {0} {1} {2}", package.name, package.versionString ?? string.Empty);
+ _logger.LogInformation("New plugin installed: {0} {1} {2}", package.name, package.version);
PluginInstalled?.Invoke(this, new GenericEventArgs<VersionInfo>(package));
}
else
{
- _logger.LogInformation("Plugin updated: {0} {1} {2}", package.name, package.versionString ?? string.Empty);
+ _logger.LogInformation("Plugin updated: {0} {1} {2}", package.name, package.version);
PluginUpdated?.Invoke(this, new GenericEventArgs<(IPlugin, VersionInfo)>((plugin, package)));
}
@@ -430,7 +429,7 @@ namespace Emby.Server.Implementations.Updates
{
lock (_currentInstallationsLock)
{
- var install = _currentInstallations.Find(x => x.info.Id == id);
+ var install = _currentInstallations.Find(x => x.info.Guid == id.ToString());
if (install == default((InstallationInfo, CancellationTokenSource)))
{
return false;
diff --git a/MediaBrowser.Model/Updates/CheckForUpdateResult.cs b/MediaBrowser.Model/Updates/CheckForUpdateResult.cs
deleted file mode 100644
index 883fc636b..000000000
--- a/MediaBrowser.Model/Updates/CheckForUpdateResult.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-namespace MediaBrowser.Model.Updates
-{
- /// <summary>
- /// Class CheckForUpdateResult.
- /// </summary>
- public class CheckForUpdateResult
- {
- /// <summary>
- /// Gets or sets a value indicating whether this instance is update available.
- /// </summary>
- /// <value><c>true</c> if this instance is update available; otherwise, <c>false</c>.</value>
- public bool IsUpdateAvailable { get; set; }
-
- /// <summary>
- /// Gets or sets the available version.
- /// </summary>
- /// <value>The available version.</value>
- public string AvailableVersion
- {
- get => Package != null ? Package.versionString : "0.0.0.1";
- set { } // need this for the serializer
- }
-
- /// <summary>
- /// Get or sets package information for an available update
- /// </summary>
- public VersionInfo Package { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Updates/InstallationInfo.cs b/MediaBrowser.Model/Updates/InstallationInfo.cs
index 95357262a..e0d450d06 100644
--- a/MediaBrowser.Model/Updates/InstallationInfo.cs
+++ b/MediaBrowser.Model/Updates/InstallationInfo.cs
@@ -8,10 +8,10 @@ namespace MediaBrowser.Model.Updates
public class InstallationInfo
{
/// <summary>
- /// Gets or sets the id.
+ /// Gets or sets the guid.
/// </summary>
- /// <value>The id.</value>
- public Guid Id { get; set; }
+ /// <value>The guid.</value>
+ public string Guid { get; set; }
/// <summary>
/// Gets or sets the name.
@@ -20,12 +20,6 @@ namespace MediaBrowser.Model.Updates
public string Name { get; set; }
/// <summary>
- /// Gets or sets the assembly guid.
- /// </summary>
- /// <value>The guid of the assembly.</value>
- public string AssemblyGuid { get; set; }
-
- /// <summary>
/// Gets or sets the version.
/// </summary>
/// <value>The version.</value>
diff --git a/MediaBrowser.Model/Updates/PackageInfo.cs b/MediaBrowser.Model/Updates/PackageInfo.cs
index d06ffe1e6..b19c311e4 100644
--- a/MediaBrowser.Model/Updates/PackageInfo.cs
+++ b/MediaBrowser.Model/Updates/PackageInfo.cs
@@ -27,18 +27,6 @@ namespace MediaBrowser.Model.Updates
public string overview { get; set; }
/// <summary>
- /// Gets or sets the thumb image.
- /// </summary>
- /// <value>The thumb image.</value>
- public string thumbImage { get; set; }
-
- /// <summary>
- /// Gets or sets the preview image.
- /// </summary>
- /// <value>The preview image.</value>
- public string previewImage { get; set; }
-
- /// <summary>
/// Gets or sets the target filename for the downloaded binary.
/// </summary>
/// <value>The target filename.</value>
diff --git a/MediaBrowser.Model/Updates/VersionInfo.cs b/MediaBrowser.Model/Updates/VersionInfo.cs
index 177b8dbc3..6756e7454 100644
--- a/MediaBrowser.Model/Updates/VersionInfo.cs
+++ b/MediaBrowser.Model/Updates/VersionInfo.cs
@@ -23,16 +23,10 @@ namespace MediaBrowser.Model.Updates
public string guid { get; set; }
/// <summary>
- /// Gets or sets the version string.
- /// </summary>
- /// <value>The version string.</value>
- public string versionString { get; set; }
-
- /// <summary>
/// Gets or sets the version.
/// </summary>
/// <value>The version.</value>
- public Version versionCode { get; set; }
+ public Version version { get; set; }
/// <summary>
/// Gets or sets the description.