The Free Software Media System - Server Backend & API
fix recent activity episode titles
Luke Pulverenti4104bc4716c9
diff --git a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.csindex 11fd3a872e..d3b2ef7ef7 100644--- a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs+++ b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs@@ -138,7 +138,7 @@ namespace Emby.Server.Implementations.ActivityCreateLogEntry(new ActivityLogEntry{- Name = string.Format(_localization.GetLocalizedString("UserStoppedPlayingItemWithValues"), user.Name, item.Name),+ Name = string.Format(_localization.GetLocalizedString("UserStoppedPlayingItemWithValues"), user.Name, Notifications.Notifications.GetItemName(item)),Type = "PlaybackStopped",ShortOverview = string.Format(_localization.GetLocalizedString("AppDeviceValues"), e.ClientName, e.DeviceName),UserId = user.Id.ToString("N")@@ -170,7 +170,7 @@ namespace Emby.Server.Implementations.ActivityCreateLogEntry(new ActivityLogEntry{- Name = string.Format(_localization.GetLocalizedString("UserStartedPlayingItemWithValues"), user.Name, item.Name),+ Name = string.Format(_localization.GetLocalizedString("UserStartedPlayingItemWithValues"), user.Name, Notifications.Notifications.GetItemName(item)),Type = "PlaybackStart",ShortOverview = string.Format(_localization.GetLocalizedString("AppDeviceValues"), e.ClientName, e.DeviceName),UserId = user.Id.ToString("N")@@ -235,10 +235,6 @@ namespace Emby.Server.Implementations.Activity});}- void _logManager_LoggerLoaded(object sender, EventArgs e)- {- }-void _config_NamedConfigurationUpdated(object sender, ConfigurationUpdateEventArgs e){CreateLogEntry(new ActivityLogEntrydiff --git a/Emby.Server.Implementations/Notifications/Notifications.cs b/Emby.Server.Implementations/Notifications/Notifications.csindex 2d441c18cc..8f24dfe1a3 100644--- a/Emby.Server.Implementations/Notifications/Notifications.cs+++ b/Emby.Server.Implementations/Notifications/Notifications.cs@@ -430,6 +430,23 @@ namespace Emby.Server.Implementations.Notificationsreturn name;}+ public static string GetItemName(BaseItemInfo item)+ {+ var name = item.Name;++ if (!string.IsNullOrWhiteSpace(item.SeriesName))+ {+ name = item.SeriesName + " - " + name;+ }++ if (item.Artists != null && item.Artists.Count > 0)+ {+ name = item.Artists[0] + " - " + name;+ }++ return name;+ }+async void _userManager_UserCreated(object sender, GenericEventArgs<User> e){var notification = new NotificationRequest