mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
Merge pull request #4562 from crobibero/playback-stop-notification
Don't send activity event if notification type is null
This commit is contained in:
commit
2d415374d6
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user