diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2020-12-10 13:53:24 +0100 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2020-12-13 20:34:32 -0500 |
| commit | 67f41386ba472311a60ba3b489f2ab1e11869f28 (patch) | |
| tree | 62e28e76d42a6d7a3d64ed64946bdc529ed35f04 | |
| parent | b1af8db42366b775074000ad56466293670afbdb (diff) | |
Merge pull request #4701 from crobibero/plugin-version
(cherry picked from commit 7455de1f85da3094e3ebfada32eeb01032478b0f)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
| -rw-r--r-- | Emby.Server.Implementations/Updates/InstallationManager.cs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index ef346dd5d..ce9ffe42b 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -12,7 +12,6 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; using Jellyfin.Data.Events; -using MediaBrowser.Common; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Json; using MediaBrowser.Common.Net; @@ -190,6 +189,22 @@ namespace Emby.Server.Implementations.Updates continue; } + for (var i = package.versions.Count - 1; i >= 0; i--) + { + // Remove versions with a target abi that is greater then the current application version. + if (Version.TryParse(package.versions[i].targetAbi, out var targetAbi) + && _applicationHost.ApplicationVersion < targetAbi) + { + package.versions.RemoveAt(i); + } + } + + // Don't add a package that doesn't have any compatible versions. + if (package.versions.Count == 0) + { + continue; + } + var existing = FilterPackages(result, package.name, packageGuid).FirstOrDefault(); if (existing != null) { |
