|
|
|
@ -123,15 +123,20 @@ namespace Emby.Server.Implementations.Updates
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!Version.TryParse(ver.TargetAbi, out var targetAbi))
|
|
|
|
|
// Only show plugins that are less than or equal to maximumAbi.
|
|
|
|
|
if (!Version.TryParse(ver.MaximumAbi, out var maximumAbi) || _applicationHost.ApplicationVersion <= maximumAbi)
|
|
|
|
|
{
|
|
|
|
|
targetAbi = minimumVersion;
|
|
|
|
|
}
|
|
|
|
|
// Check the targetAbi as well
|
|
|
|
|
if (!Version.TryParse(ver.TargetAbi, out var targetAbi))
|
|
|
|
|
{
|
|
|
|
|
targetAbi = minimumVersion;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Only show plugins that are greater than or equal to targetAbi.
|
|
|
|
|
if (_applicationHost.ApplicationVersion >= targetAbi)
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
// Only show plugins that are greater than or equal to targetAbi.
|
|
|
|
|
if (_applicationHost.ApplicationVersion >= targetAbi)
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Not compatible with this version so remove it.
|
|
|
|
@ -187,6 +192,13 @@ namespace Emby.Server.Implementations.Updates
|
|
|
|
|
await _pluginManager.PopulateManifest(package, version.VersionNumber, plugin.Path, plugin.Manifest.Status).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Remove versions with a maximum ABI greater than the current application version.
|
|
|
|
|
if (Version.TryParse(version.MaximumAbi, out var maximumAbi) && _applicationHost.ApplicationVersion > maximumAbi)
|
|
|
|
|
{
|
|
|
|
|
package.Versions.RemoveAt(i);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Remove versions with a target ABI greater than the current application version.
|
|
|
|
|
if (Version.TryParse(version.TargetAbi, out var targetAbi) && _applicationHost.ApplicationVersion < targetAbi)
|
|
|
|
|
{
|
|
|
|
@ -259,7 +271,8 @@ namespace Emby.Server.Implementations.Updates
|
|
|
|
|
|
|
|
|
|
var appVer = _applicationHost.ApplicationVersion;
|
|
|
|
|
var availableVersions = package.Versions
|
|
|
|
|
.Where(x => string.IsNullOrEmpty(x.TargetAbi) || Version.Parse(x.TargetAbi) <= appVer);
|
|
|
|
|
.Where(x => string.IsNullOrEmpty(x.TargetAbi) || Version.Parse(x.TargetAbi) <= appVer)
|
|
|
|
|
.Where(x => string.IsNullOrEmpty(x.MaximumAbi) || Version.Parse(x.MaximumAbi) >= appVer);
|
|
|
|
|
|
|
|
|
|
if (specificVersion is not null)
|
|
|
|
|
{
|
|
|
|
|