Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few issues with the plugin manifest #3164

Merged
merged 8 commits into from Jun 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs
Expand Up @@ -377,50 +377,50 @@ private async void OnSessionStarted(object sender, SessionEventArgs e)
}).ConfigureAwait(false);
}

private async void OnPluginUpdated(object sender, GenericEventArgs<(IPlugin, VersionInfo)> e)
private async void OnPluginUpdated(object sender, InstallationInfo e)
{
await CreateLogEntry(new ActivityLog(
string.Format(
CultureInfo.InvariantCulture,
_localization.GetLocalizedString("PluginUpdatedWithName"),
e.Argument.Item1.Name),
e.Name),
NotificationType.PluginUpdateInstalled.ToString(),
Guid.Empty)
{
ShortOverview = string.Format(
CultureInfo.InvariantCulture,
_localization.GetLocalizedString("VersionNumber"),
e.Argument.Item2.version),
Overview = e.Argument.Item2.changelog
e.Version),
Overview = e.Changelog
}).ConfigureAwait(false);
}

private async void OnPluginUninstalled(object sender, GenericEventArgs<IPlugin> e)
private async void OnPluginUninstalled(object sender, IPlugin e)
{
await CreateLogEntry(new ActivityLog(
string.Format(
CultureInfo.InvariantCulture,
_localization.GetLocalizedString("PluginUninstalledWithName"),
e.Argument.Name),
e.Name),
NotificationType.PluginUninstalled.ToString(),
Guid.Empty))
.ConfigureAwait(false);
}

private async void OnPluginInstalled(object sender, GenericEventArgs<VersionInfo> e)
private async void OnPluginInstalled(object sender, InstallationInfo e)
{
await CreateLogEntry(new ActivityLog(
string.Format(
CultureInfo.InvariantCulture,
_localization.GetLocalizedString("PluginInstalledWithName"),
e.Argument.name),
e.Name),
NotificationType.PluginInstalled.ToString(),
Guid.Empty)
{
ShortOverview = string.Format(
CultureInfo.InvariantCulture,
_localization.GetLocalizedString("VersionNumber"),
e.Argument.version)
e.Version)
}).ConfigureAwait(false);
}

Expand Down
17 changes: 9 additions & 8 deletions Emby.Server.Implementations/EntryPoints/ServerEventNotifier.cs
Expand Up @@ -12,6 +12,7 @@
using MediaBrowser.Controller.Session;
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Tasks;
using MediaBrowser.Model.Updates;

namespace Emby.Server.Implementations.EntryPoints
{
Expand Down Expand Up @@ -85,19 +86,19 @@ public Task RunAsync()
return Task.CompletedTask;
}

private async void OnPackageInstalling(object sender, InstallationEventArgs e)
private async void OnPackageInstalling(object sender, InstallationInfo e)
{
await SendMessageToAdminSessions("PackageInstalling", e.InstallationInfo).ConfigureAwait(false);
await SendMessageToAdminSessions("PackageInstalling", e).ConfigureAwait(false);
}

private async void OnPackageInstallationCancelled(object sender, InstallationEventArgs e)
private async void OnPackageInstallationCancelled(object sender, InstallationInfo e)
{
await SendMessageToAdminSessions("PackageInstallationCancelled", e.InstallationInfo).ConfigureAwait(false);
await SendMessageToAdminSessions("PackageInstallationCancelled", e).ConfigureAwait(false);
}

private async void OnPackageInstallationCompleted(object sender, InstallationEventArgs e)
private async void OnPackageInstallationCompleted(object sender, InstallationInfo e)
{
await SendMessageToAdminSessions("PackageInstallationCompleted", e.InstallationInfo).ConfigureAwait(false);
await SendMessageToAdminSessions("PackageInstallationCompleted", e).ConfigureAwait(false);
}

private async void OnPackageInstallationFailed(object sender, InstallationFailedEventArgs e)
Expand All @@ -115,9 +116,9 @@ private async void OnTaskCompleted(object sender, TaskCompletionEventArgs e)
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The e.</param>
private async void OnPluginUninstalled(object sender, GenericEventArgs<IPlugin> e)
private async void OnPluginUninstalled(object sender, IPlugin e)
{
await SendMessageToAdminSessions("PluginUninstalled", e.Argument.GetPluginInfo()).ConfigureAwait(false);
await SendMessageToAdminSessions("PluginUninstalled", e).ConfigureAwait(false);
}

/// <summary>
Expand Down
Expand Up @@ -82,11 +82,11 @@ public async Task Execute(CancellationToken cancellationToken, IProgress<double>
}
catch (HttpException ex)
{
_logger.LogError(ex, "Error downloading {0}", package.name);
_logger.LogError(ex, "Error downloading {0}", package.Name);
}
catch (IOException ex)
{
_logger.LogError(ex, "Error updating {0}", package.name);
_logger.LogError(ex, "Error updating {0}", package.Name);
}

// Update progress
Expand Down