aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Plugins/PluginManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Plugins/PluginManager.cs')
-rw-r--r--Emby.Server.Implementations/Plugins/PluginManager.cs16
1 files changed, 2 insertions, 14 deletions
diff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.cs
index d70a15dbc..45ef36441 100644
--- a/Emby.Server.Implementations/Plugins/PluginManager.cs
+++ b/Emby.Server.Implementations/Plugins/PluginManager.cs
@@ -360,11 +360,6 @@ namespace Emby.Server.Implementations.Plugins
/// <inheritdoc/>
public async Task<bool> GenerateManifest(PackageInfo packageInfo, Version version, string path, PluginStatus status)
{
- if (packageInfo == null)
- {
- return false;
- }
-
var versionInfo = packageInfo.Versions.First(v => v.Version == version.ToString());
var imagePath = string.Empty;
@@ -488,7 +483,7 @@ namespace Emby.Server.Implementations.Plugins
var pluginStr = instance.Version.ToString();
bool changed = false;
if (string.Equals(manifest.Version, pluginStr, StringComparison.Ordinal)
- || manifest.Id != instance.Id)
+ || !manifest.Id.Equals(instance.Id))
{
// If a plugin without a manifest failed to load due to an external issue (eg config),
// this updates the manifest to the actual plugin values.
@@ -617,7 +612,7 @@ namespace Emby.Server.Implementations.Plugins
if (versionIndex != -1)
{
// Get the version number from the filename if possible.
- metafile = Path.GetFileName(dir[..versionIndex]) ?? dir[..versionIndex];
+ metafile = Path.GetFileName(dir[..versionIndex]);
version = Version.TryParse(dir.AsSpan()[(versionIndex + 1)..], out Version? parsedVersion) ? parsedVersion : _appVersion;
}
else
@@ -682,7 +677,6 @@ namespace Emby.Server.Implementations.Plugins
continue;
}
- var manifest = entry.Manifest;
var cleaned = false;
var path = entry.Path;
if (_config.RemoveOldPlugins)
@@ -707,12 +701,6 @@ namespace Emby.Server.Implementations.Plugins
}
else
{
- if (manifest == null)
- {
- _logger.LogWarning("Unable to disable plugin {Path}", entry.Path);
- continue;
- }
-
ChangePluginState(entry, PluginStatus.Deleted);
}
}