aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Plugins/PluginManager.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2021-12-27 07:33:11 -0700
committerGitHub <noreply@github.com>2021-12-27 07:33:11 -0700
commit251b9a5235e728f5b755cfd4b95f844e5e6c435f (patch)
treeae88958599f260ea1d7e586c6a47931a5fe62f6b /Emby.Server.Implementations/Plugins/PluginManager.cs
parent4441513ca4a64fdf61541e56cbb1091e7aa0395b (diff)
parentea8f40e84a72ab1eb0bdbe4974cb78f7d1b0f552 (diff)
Merge pull request #7004 from Bond-009/cleanup2
Diffstat (limited to 'Emby.Server.Implementations/Plugins/PluginManager.cs')
-rw-r--r--Emby.Server.Implementations/Plugins/PluginManager.cs14
1 files changed, 1 insertions, 13 deletions
diff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.cs
index d70a15dbc..a805924dd 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;
@@ -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);
}
}