diff options
| author | crobibero <cody@robibe.ro> | 2020-09-09 12:02:05 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-09-09 12:02:05 -0600 |
| commit | 612e135c8c2b349e904bc555435bfc0977ed80d0 (patch) | |
| tree | 8093307690ac8f1be6b08daa9042badad02b29f7 /Emby.Server.Implementations/Updates/InstallationManager.cs | |
| parent | eab92a0b0124c2e89a8e11d4d6a8031f17834e36 (diff) | |
| parent | b76d4ba454c43cc6293b733f2bba363e34a9bf5e (diff) | |
Merge remote-tracking branch 'upstream/master' into api-stream-return
Diffstat (limited to 'Emby.Server.Implementations/Updates/InstallationManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Updates/InstallationManager.cs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index f121a3493..e19158f8e 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -183,7 +183,8 @@ namespace Emby.Server.Implementations.Updates IEnumerable<PackageInfo> availablePackages, string name = null, Guid guid = default, - Version minVersion = null) + Version minVersion = null, + Version specificVersion = null) { var package = FilterPackages(availablePackages, name, guid).FirstOrDefault(); @@ -197,7 +198,11 @@ namespace Emby.Server.Implementations.Updates var availableVersions = package.versions .Where(x => Version.Parse(x.targetAbi) <= appVer); - if (minVersion != null) + if (specificVersion != null) + { + availableVersions = availableVersions.Where(x => new Version(x.version) == specificVersion); + } + else if (minVersion != null) { availableVersions = availableVersions.Where(x => new Version(x.version) >= minVersion); } @@ -227,8 +232,8 @@ namespace Emby.Server.Implementations.Updates { foreach (var plugin in _applicationHost.Plugins) { - var compatibleversions = GetCompatibleVersions(pluginCatalog, plugin.Name, plugin.Id, plugin.Version); - var version = compatibleversions.FirstOrDefault(y => y.Version > plugin.Version); + var compatibleVersions = GetCompatibleVersions(pluginCatalog, plugin.Name, plugin.Id, minVersion: plugin.Version); + var version = compatibleVersions.FirstOrDefault(y => y.Version > plugin.Version); if (version != null && CompletedInstallations.All(x => x.Guid != version.Guid)) { yield return version; |
