mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
Don't return plugin versions that target newer Jellyfin version
This commit is contained in:
parent
a7b461adb4
commit
8df2213d6b
1 changed files with 16 additions and 1 deletions
|
@ -12,7 +12,6 @@ using System.Text.Json;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Jellyfin.Data.Events;
|
using Jellyfin.Data.Events;
|
||||||
using MediaBrowser.Common;
|
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Common.Json;
|
using MediaBrowser.Common.Json;
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
|
@ -190,6 +189,22 @@ namespace Emby.Server.Implementations.Updates
|
||||||
continue;
|
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();
|
var existing = FilterPackages(result, package.name, packageGuid).FirstOrDefault();
|
||||||
if (existing != null)
|
if (existing != null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue