aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
authorGreenback <jimcartlidge@yahoo.co.uk>2020-12-18 09:44:57 +0000
committerGreenback <jimcartlidge@yahoo.co.uk>2020-12-18 09:44:57 +0000
commit486148dd6b18ec336ca076b8ec0a23d257789683 (patch)
tree0125da066dc53169f3d2413ae82d7b422a50eeff /Emby.Server.Implementations
parent5a3efc526631b7f774b17ea5a8a54130696b6e25 (diff)
Removed maxAbi
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs1
-rw-r--r--Emby.Server.Implementations/Plugins/PluginManager.cs11
-rw-r--r--Emby.Server.Implementations/Updates/InstallationManager.cs18
3 files changed, 6 insertions, 24 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index d7bc83f3a..b91ba6b6c 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -286,7 +286,6 @@ namespace Emby.Server.Implementations
this,
ServerConfigurationManager.Configuration,
ApplicationPaths.PluginsPath,
- ApplicationPaths.CachePath,
ApplicationVersion);
}
diff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.cs
index 151e2c203..4c508279c 100644
--- a/Emby.Server.Implementations/Plugins/PluginManager.cs
+++ b/Emby.Server.Implementations/Plugins/PluginManager.cs
@@ -39,17 +39,15 @@ namespace Emby.Server.Implementations.Plugins
/// <param name="appHost">The <see cref="IApplicationHost"/>.</param>
/// <param name="config">The <see cref="ServerConfiguration"/>.</param>
/// <param name="pluginsPath">The plugin path.</param>
- /// <param name="imagesPath">The image cache path.</param>
/// <param name="appVersion">The application version.</param>
public PluginManager(
ILogger<PluginManager> logger,
IApplicationHost appHost,
ServerConfiguration config,
string pluginsPath,
- string imagesPath,
Version appVersion)
{
- _logger = _logger ?? throw new ArgumentNullException(nameof(logger));
+ _logger = logger ?? throw new ArgumentNullException(nameof(logger));
_pluginsPath = pluginsPath;
_appVersion = appVersion ?? throw new ArgumentNullException(nameof(appVersion));
_jsonOptions = JsonDefaults.GetOptions();
@@ -509,17 +507,12 @@ namespace Emby.Server.Implementations.Plugins
targetAbi = _minimumVersion;
}
- if (!Version.TryParse(manifest.MaxAbi, out var maxAbi))
- {
- maxAbi = _appVersion;
- }
-
if (!Version.TryParse(manifest.Version, out version))
{
manifest.Version = _minimumVersion.ToString();
}
- return new LocalPlugin(dir, _appVersion >= targetAbi && _appVersion <= maxAbi, manifest);
+ return new LocalPlugin(dir, _appVersion >= targetAbi, manifest);
}
// No metafile, so lets see if the folder is versioned.
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs
index 70424369b..cf059fb97 100644
--- a/Emby.Server.Implementations/Updates/InstallationManager.cs
+++ b/Emby.Server.Implementations/Updates/InstallationManager.cs
@@ -132,13 +132,8 @@ namespace Emby.Server.Implementations.Updates
targetAbi = minimumVersion;
}
- if (!Version.TryParse(ver.MaxAbi, out var maxAbi))
- {
- maxAbi = _applicationHost.ApplicationVersion;
- }
-
// Only show plugins that fall between targetAbi and maxAbi
- if (_applicationHost.ApplicationVersion >= targetAbi && _applicationHost.ApplicationVersion <= maxAbi)
+ if (_applicationHost.ApplicationVersion >= targetAbi)
{
continue;
}
@@ -200,19 +195,15 @@ namespace Emby.Server.Implementations.Updates
// Update the manifests, if anything changes.
if (plugin != null)
{
- bool noChange = string.Equals(plugin.Manifest.MaxAbi, version.MaxAbi, StringComparison.Ordinal)
- || string.Equals(plugin.Manifest.TargetAbi, version.TargetAbi, StringComparison.Ordinal);
- if (!noChange)
+ if (!string.Equals(plugin.Manifest.TargetAbi, version.TargetAbi, StringComparison.Ordinal))
{
- plugin.Manifest.MaxAbi = version.MaxAbi ?? string.Empty;
plugin.Manifest.TargetAbi = version.TargetAbi ?? string.Empty;
_pluginManager.SaveManifest(plugin.Manifest, plugin.Path);
}
}
// Remove versions with a target abi that is greater then the current application version.
- if ((Version.TryParse(version.TargetAbi, out var targetAbi) && _applicationHost.ApplicationVersion < targetAbi)
- || (Version.TryParse(version.MaxAbi, out var maxAbi) && _applicationHost.ApplicationVersion > maxAbi))
+ if (Version.TryParse(version.TargetAbi, out var targetAbi) && _applicationHost.ApplicationVersion < targetAbi)
{
package.Versions.RemoveAt(i);
}
@@ -283,8 +274,7 @@ namespace Emby.Server.Implementations.Updates
var appVer = _applicationHost.ApplicationVersion;
var availableVersions = package.Versions
- .Where(x => (string.IsNullOrEmpty(x.TargetAbi) || Version.Parse(x.TargetAbi) <= appVer)
- && (string.IsNullOrEmpty(x.MaxAbi) || Version.Parse(x.MaxAbi) >= appVer));
+ .Where(x => string.IsNullOrEmpty(x.TargetAbi) || Version.Parse(x.TargetAbi) <= appVer);
if (specificVersion != null)
{