Add item id to playback start/stop events

pull/9875/head
Shadowghost 12 months ago
parent 958f8f71e8
commit 46a6755e65

@ -58,15 +58,18 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session
var user = eventArgs.Users[0];
await _activityManager.CreateAsync(new ActivityLog(
string.Format(
CultureInfo.InvariantCulture,
_localizationManager.GetLocalizedString("UserStartedPlayingItemWithValues"),
user.Username,
GetItemName(eventArgs.MediaInfo),
eventArgs.DeviceName),
GetPlaybackNotificationType(eventArgs.MediaInfo.MediaType),
user.Id))
.ConfigureAwait(false);
string.Format(
CultureInfo.InvariantCulture,
_localizationManager.GetLocalizedString("UserStartedPlayingItemWithValues"),
user.Username,
GetItemName(eventArgs.MediaInfo),
eventArgs.DeviceName),
GetPlaybackNotificationType(eventArgs.MediaInfo.MediaType),
user.Id)
{
ItemId = eventArgs.Item?.Id.ToString()
})
.ConfigureAwait(false);
}
private static string GetItemName(BaseItemDto item)

@ -73,7 +73,10 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session
GetItemName(item),
eventArgs.DeviceName),
notificationType,
user.Id))
user.Id)
{
ItemId = eventArgs.Item?.Id.ToString()
})
.ConfigureAwait(false);
}

Loading…
Cancel
Save