mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Apply review feedback
Remove a few superfluous/testing log statements, and print the deletion debug messages when it occurs rather than earlier. Use a nicer name for the isDirectory variable.
This commit is contained in:
parent
05a4161fd3
commit
09505e0988
@ -85,11 +85,9 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
private void OnPluginInstalled(PackageVersionInfo package)
|
private void OnPluginInstalled(PackageVersionInfo package)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("New plugin installed: {0} {1} {2}", package.name, package.versionStr ?? string.Empty, package.classification);
|
_logger.LogInformation("New plugin installed: {0} {1} {2}", package.name, package.versionStr ?? string.Empty, package.classification);
|
||||||
_logger.LogDebug("{String}", package.name);
|
|
||||||
|
|
||||||
PluginInstalled?.Invoke(this, new GenericEventArgs<PackageVersionInfo> { Argument = package });
|
PluginInstalled?.Invoke(this, new GenericEventArgs<PackageVersionInfo> { Argument = package });
|
||||||
|
|
||||||
_logger.LogDebug("{String}", package.name);
|
|
||||||
_applicationHost.NotifyPendingRestart();
|
_applicationHost.NotifyPendingRestart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -585,17 +583,12 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
_applicationHost.RemovePlugin(plugin);
|
_applicationHost.RemovePlugin(plugin);
|
||||||
|
|
||||||
var path = plugin.AssemblyFilePath;
|
var path = plugin.AssemblyFilePath;
|
||||||
bool is_path_directory = false;
|
bool isDirectory = false;
|
||||||
// Check if we have a plugin directory we should remove too
|
// Check if we have a plugin directory we should remove too
|
||||||
if (Path.GetDirectoryName(plugin.AssemblyFilePath) != _appPaths.PluginsPath)
|
if (Path.GetDirectoryName(plugin.AssemblyFilePath) != _appPaths.PluginsPath)
|
||||||
{
|
{
|
||||||
path = Path.GetDirectoryName(plugin.AssemblyFilePath);
|
path = Path.GetDirectoryName(plugin.AssemblyFilePath);
|
||||||
is_path_directory = true;
|
isDirectory = true;
|
||||||
_logger.LogInformation("Deleting plugin directory {0}", path);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_logger.LogInformation("Deleting plugin file {0}", path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make this case-insensitive to account for possible incorrect assembly naming
|
// Make this case-insensitive to account for possible incorrect assembly naming
|
||||||
@ -607,12 +600,14 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
path = file;
|
path = file;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_path_directory)
|
if (isDirectory)
|
||||||
{
|
{
|
||||||
|
_logger.LogInformation("Deleting plugin directory {0}", path);
|
||||||
Directory.Delete(path, true);
|
Directory.Delete(path, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
_logger.LogInformation("Deleting plugin file {0}", path);
|
||||||
_fileSystem.DeleteFile(path);
|
_fileSystem.DeleteFile(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user