Merge pull request #4170 from BaronGreenback/VersioningImprovement
Plugin versioning - amended for plugins without meta.json
This commit is contained in:
commit
236dfe3ed8
|
@ -1086,9 +1086,20 @@ namespace Emby.Server.Implementations
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// No metafile, so lets see if the folder is versioned.
|
||||||
metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1];
|
metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1];
|
||||||
// Add it under the path name and version 0.0.0.1.
|
|
||||||
versions.Add((new Version(0, 0, 0, 1), metafile, dir));
|
int versionIndex = dir.LastIndexOf('_');
|
||||||
|
if (versionIndex != -1 && Version.TryParse(dir.Substring(versionIndex + 1), out Version ver))
|
||||||
|
{
|
||||||
|
// Versioned folder.
|
||||||
|
versions.Add((ver, metafile, dir));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Un-versioned folder - Add it under the path name and version 0.0.0.1.
|
||||||
|
versions.Add((new Version(0, 0, 0, 1), metafile, dir));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
|
Loading…
Reference in New Issue
Block a user