From 4104bc4716c9ddc525cab9957cc68910919e7240 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 13 Jan 2017 02:26:22 -0500 Subject: fix recent activity episode titles --- .../Notifications/Notifications.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Emby.Server.Implementations/Notifications') diff --git a/Emby.Server.Implementations/Notifications/Notifications.cs b/Emby.Server.Implementations/Notifications/Notifications.cs index 2d441c18c..8f24dfe1a 100644 --- a/Emby.Server.Implementations/Notifications/Notifications.cs +++ b/Emby.Server.Implementations/Notifications/Notifications.cs @@ -430,6 +430,23 @@ namespace Emby.Server.Implementations.Notifications return 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 e) { var notification = new NotificationRequest -- cgit v1.2.3