aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Events
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-11-23 08:18:07 -0700
committercrobibero <cody@robibe.ro>2020-11-23 08:18:07 -0700
commit5de8c249a060dc9a923c42aa544313713ce6d8ed (patch)
tree34d978ee9a46e74f5737b3039194efd84634fbd9 /Jellyfin.Server.Implementations/Events
parent02c1879533236b3aab5d15be58ea204aa1325206 (diff)
Don't send activity event if notification type is null
Diffstat (limited to 'Jellyfin.Server.Implementations/Events')
-rw-r--r--Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs
index 51a882c14..a0bad29e9 100644
--- a/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs
+++ b/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs
@@ -59,6 +59,12 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session
var user = eventArgs.Users[0];
+ var notificationType = GetPlaybackStoppedNotificationType(item.MediaType);
+ if (notificationType == null)
+ {
+ return;
+ }
+
await _activityManager.CreateAsync(new ActivityLog(
string.Format(
CultureInfo.InvariantCulture,
@@ -66,7 +72,7 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session
user.Username,
GetItemName(item),
eventArgs.DeviceName),
- GetPlaybackStoppedNotificationType(item.MediaType),
+ notificationType,
user.Id))
.ConfigureAwait(false);
}