diff options
| author | Bill Thornton <thornbill@users.noreply.github.com> | 2020-11-23 14:16:03 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-23 14:16:03 -0500 |
| commit | 2d415374d608b87fec32eb9ccf5e388f4efc69f0 (patch) | |
| tree | a5e93db832072750513d529b0986c0a37b06ce24 | |
| parent | 4f96e2f256bbfc0a3be9c7763d37c462c1eaa6dc (diff) | |
| parent | 5de8c249a060dc9a923c42aa544313713ce6d8ed (diff) | |
Merge pull request #4562 from crobibero/playback-stop-notification
Don't send activity event if notification type is null
| -rw-r--r-- | Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs | 8 |
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); } |
