diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-01-13 02:31:54 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-13 02:31:54 -0500 |
| commit | dddbde2950d26b0653371773d1deebaad092b555 (patch) | |
| tree | dc8711499eee7db5bb6839cd2abd3dfeff891c42 /Emby.Server.Implementations/Notifications | |
| parent | f367cd19dcc1d4320a0dc9abcfb5eaf2c390872d (diff) | |
| parent | 4104bc4716c9ddc525cab9957cc68910919e7240 (diff) | |
Merge pull request #2394 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/Notifications')
| -rw-r--r-- | Emby.Server.Implementations/Notifications/Notifications.cs | 17 |
1 files changed, 17 insertions, 0 deletions
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<User> e) { var notification = new NotificationRequest |
