aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs')
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs37
1 files changed, 34 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs
index 918110226..e84b66c5a 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs
@@ -22,6 +22,7 @@ using System.Globalization;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+using MediaBrowser.Controller.Entities.TV;
namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
{
@@ -116,7 +117,8 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
var notification = new NotificationRequest
{
- NotificationType = type
+ NotificationType = type,
+ Url = e.Argument.infoUrl
};
notification.Variables["Version"] = e.Argument.versionStr;
@@ -213,6 +215,12 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
return;
}
+ var video = e.Item as Video;
+ if (video != null && video.IsThemeMedia)
+ {
+ return;
+ }
+
var type = GetPlaybackNotificationType(item.MediaType);
SendPlaybackNotification(type, e);
@@ -228,6 +236,12 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
return;
}
+ var video = e.Item as Video;
+ if (video != null && video.IsThemeMedia)
+ {
+ return;
+ }
+
var type = GetPlaybackStoppedNotificationType(item.MediaType);
SendPlaybackNotification(type, e);
@@ -334,12 +348,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;
}
@@ -387,6 +406,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;