|
|
|
@ -181,6 +181,8 @@ namespace Emby.Server.Implementations
|
|
|
|
|
|
|
|
|
|
private IPlugin[] _plugins;
|
|
|
|
|
|
|
|
|
|
private IEnumerable<LocalPlugin> _pluginsManifests;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the plugins.
|
|
|
|
|
/// </summary>
|
|
|
|
@ -772,6 +774,23 @@ namespace Emby.Server.Implementations
|
|
|
|
|
|
|
|
|
|
foreach (var plugin in Plugins)
|
|
|
|
|
{
|
|
|
|
|
if (plugin is IPluginAssembly assemblyPlugin)
|
|
|
|
|
{
|
|
|
|
|
// Ensure the version number matches the Plugin Manifest information.
|
|
|
|
|
foreach (var item in _pluginsManifests)
|
|
|
|
|
{
|
|
|
|
|
if (item.Path.Equals(plugin.AssemblyFilePath, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
// Update version number to that of the manifest.
|
|
|
|
|
assemblyPlugin.SetAttributes(
|
|
|
|
|
plugin.AssemblyFilePath,
|
|
|
|
|
Path.Combine(ApplicationPaths.PluginsPath, Path.GetFileNameWithoutExtension(plugin.AssemblyFilePath)),
|
|
|
|
|
item.Version);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pluginBuilder.Append(plugin.Name)
|
|
|
|
|
.Append(' ')
|
|
|
|
|
.Append(plugin.Version)
|
|
|
|
@ -1093,7 +1112,8 @@ namespace Emby.Server.Implementations
|
|
|
|
|
{
|
|
|
|
|
if (Directory.Exists(ApplicationPaths.PluginsPath))
|
|
|
|
|
{
|
|
|
|
|
foreach (var plugin in GetLocalPlugins(ApplicationPaths.PluginsPath))
|
|
|
|
|
_pluginsManifests = GetLocalPlugins(ApplicationPaths.PluginsPath);
|
|
|
|
|
foreach (var plugin in _pluginsManifests)
|
|
|
|
|
{
|
|
|
|
|
foreach (var file in plugin.DllFiles)
|
|
|
|
|
{
|
|
|
|
|