aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/EntryPoints/Notifications
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-04-16 15:28:00 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-04-16 15:28:00 -0400
commitf3f3da0d8be8b7e6c956982b525283ae4b86876e (patch)
treeb49edf8c7291886f46569437349e1075b30c66f5 /MediaBrowser.Server.Implementations/EntryPoints/Notifications
parentb0839ffd2c10cb7a8ec0837f897db61ddd3a7c01 (diff)
parent18dbdb194b6db75c1acb5457e9797d8b37150c07 (diff)
Merge branch 'master' of https://github.com/MediaBrowser/Emby
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/Notifications')
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs24
1 files changed, 20 insertions, 4 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs
index ca430eda9..71019e0ad 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs
@@ -22,8 +22,7 @@ using System.Globalization;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using MediaBrowser.Controller.Channels;
-using MediaBrowser.Controller.LiveTv;
+using MediaBrowser.Controller.Entities.TV;
namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
{
@@ -337,12 +336,17 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
private bool FilterItem(BaseItem item)
{
- if (!item.IsFolder && item.LocationType == LocationType.Virtual)
+ if (item.IsFolder)
{
return false;
}
- if (item is IItemByName && !(item is MusicArtist))
+ if (item.LocationType == LocationType.Virtual)
+ {
+ return false;
+ }
+
+ if (item is IItemByName)
{
return false;
}
@@ -390,6 +394,18 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
public static string GetItemName(BaseItem item)
{
var name = item.Name;
+ var episode = item as Episode;
+ if (episode != null)
+ {
+ if (episode.IndexNumber.HasValue)
+ {
+ name = string.Format("Ep{0} - {1}", episode.IndexNumber.Value.ToString(CultureInfo.InvariantCulture), name);
+ }
+ if (episode.ParentIndexNumber.HasValue)
+ {
+ name = string.Format("S{0}, {1}", episode.ParentIndexNumber.Value.ToString(CultureInfo.InvariantCulture), name);
+ }
+ }
var hasSeries = item as IHasSeries;