Renamed file.

pull/3401/head
Jim Cartlidge 4 years ago
parent f73e744785
commit d27d2a8990

@ -1051,12 +1051,16 @@ namespace Emby.Server.Implementations
var dllList = new List<string>();
var versions = new List<(Version PluginVersion, string Name, string Path)>();
var directories = Directory.EnumerateDirectories(path, "*.*", SearchOption.TopDirectoryOnly);
string metafile;
foreach (var dir in directories)
{
try
{
var manifest = _jsonSerializer.DeserializeFromFile<PlugInManifest>(Path.Combine(dir, "meta.json"));
metafile = Path.Combine(dir, "meta.json");
if (File.Exists(metafile))
{
var manifest = _jsonSerializer.DeserializeFromFile<PluginManifest>(metafile);
if (!Version.TryParse(manifest.TargetAbi, out var targetAbi))
{
@ -1068,12 +1072,19 @@ namespace Emby.Server.Implementations
version = new Version(0, 0, 0, 1);
}
if (targetAbi >= ApplicationVersion)
if (ApplicationVersion <= targetAbi)
{
// Only load Plugins for this version or below.
// Only load Plugins if the plugin is built for this version or below.
versions.Add((version, manifest.Name, dir));
}
}
else
{
metafile = dir.Split(new char[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries).Last();
// Add it under the path name and version 0.0.0.1.
versions.Add((new Version("0.0.0.1"), metafile, dir));
}
}
catch
{
continue;

Loading…
Cancel
Save