diff options
| author | Patrick Barron <18354464+barronpm@users.noreply.github.com> | 2020-04-22 13:44:20 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-22 13:44:20 +0000 |
| commit | 7586c6022428fd4e1296653a5c281d83b64c7f8e (patch) | |
| tree | 539c9ca4b74a8027d0e636f7a86c587bd74b05a3 /Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs | |
| parent | f26f44acaf86bb35ff1d2be7cb37a57dee7a47cf (diff) | |
| parent | a85b1dcba663fe3bbb2441380cd8da382c92f2bd (diff) | |
Merge branch 'master' into warnings-cleanup1
Diffstat (limited to 'Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs')
| -rw-r--r-- | Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs index 2ea678976..4685a03ac 100644 --- a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs +++ b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs @@ -26,7 +26,7 @@ using Microsoft.Extensions.Logging; namespace Emby.Server.Implementations.Activity { /// <summary> - /// The activity log entry point. + /// Entry point for the activity logger. /// </summary> public sealed class ActivityLogEntryPoint : IServerEntryPoint { @@ -169,7 +169,12 @@ namespace Emby.Server.Implementations.Activity CreateLogEntry(new ActivityLogEntry { - Name = string.Format(_localization.GetLocalizedString("UserStoppedPlayingItemWithValues"), user.Name, GetItemName(item), e.DeviceName), + Name = string.Format( + CultureInfo.InvariantCulture, + _localization.GetLocalizedString("UserStoppedPlayingItemWithValues"), + user.Name, + GetItemName(item), + e.DeviceName), Type = GetPlaybackStoppedNotificationType(item.MediaType), UserId = user.Id }); @@ -395,7 +400,7 @@ namespace Emby.Server.Implementations.Activity }); } - private void OnPluginUpdated(object sender, GenericEventArgs<(IPlugin, PackageVersionInfo)> e) + private void OnPluginUpdated(object sender, GenericEventArgs<(IPlugin, VersionInfo)> e) { CreateLogEntry(new ActivityLogEntry { @@ -407,8 +412,8 @@ namespace Emby.Server.Implementations.Activity ShortOverview = string.Format( CultureInfo.InvariantCulture, _localization.GetLocalizedString("VersionNumber"), - e.Argument.Item2.versionStr), - Overview = e.Argument.Item2.description + e.Argument.Item2.version), + Overview = e.Argument.Item2.changelog }); } @@ -424,7 +429,7 @@ namespace Emby.Server.Implementations.Activity }); } - private void OnPluginInstalled(object sender, GenericEventArgs<PackageVersionInfo> e) + private void OnPluginInstalled(object sender, GenericEventArgs<VersionInfo> e) { CreateLogEntry(new ActivityLogEntry { @@ -436,7 +441,7 @@ namespace Emby.Server.Implementations.Activity ShortOverview = string.Format( CultureInfo.InvariantCulture, _localization.GetLocalizedString("VersionNumber"), - e.Argument.versionStr) + e.Argument.version) }); } @@ -464,7 +469,8 @@ namespace Emby.Server.Implementations.Activity var result = e.Result; var task = e.Task; - if (task.ScheduledTask is IConfigurableScheduledTask activityTask && !activityTask.IsLogged) + if (task.ScheduledTask is IConfigurableScheduledTask activityTask + && !activityTask.IsLogged) { return; } @@ -538,9 +544,7 @@ namespace Emby.Server.Implementations.Activity /// <summary> /// Constructs a user-friendly string for this TimeSpan instance. /// </summary> - /// <param name="span">The timespan.</param> - /// <returns>The user-friendly string.</returns> - public static string ToUserFriendlyString(TimeSpan span) + private static string ToUserFriendlyString(TimeSpan span) { const int DaysInYear = 365; const int DaysInMonth = 30; |
