aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/EntryPoints/Notifications
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-04-16 15:26:00 -0400
committerLuke <luke.pulverenti@gmail.com>2016-04-16 15:26:00 -0400
commit18dbdb194b6db75c1acb5457e9797d8b37150c07 (patch)
treef23d3d169ba1d6befcee6b0262133e778e815323 /MediaBrowser.Server.Implementations/EntryPoints/Notifications
parent007f4e193af99036b250a8323f92b753a9b74797 (diff)
parented6d8ae87f95acecc4636004574b551e3dc5b0fe (diff)
Merge pull request #1653 from MediaBrowser/beta
Beta
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;