Add item id to playback start/stop events
This commit is contained in:
parent
958f8f71e8
commit
46a6755e65
|
@ -58,15 +58,18 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session
|
||||||
var user = eventArgs.Users[0];
|
var user = eventArgs.Users[0];
|
||||||
|
|
||||||
await _activityManager.CreateAsync(new ActivityLog(
|
await _activityManager.CreateAsync(new ActivityLog(
|
||||||
string.Format(
|
string.Format(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
_localizationManager.GetLocalizedString("UserStartedPlayingItemWithValues"),
|
_localizationManager.GetLocalizedString("UserStartedPlayingItemWithValues"),
|
||||||
user.Username,
|
user.Username,
|
||||||
GetItemName(eventArgs.MediaInfo),
|
GetItemName(eventArgs.MediaInfo),
|
||||||
eventArgs.DeviceName),
|
eventArgs.DeviceName),
|
||||||
GetPlaybackNotificationType(eventArgs.MediaInfo.MediaType),
|
GetPlaybackNotificationType(eventArgs.MediaInfo.MediaType),
|
||||||
user.Id))
|
user.Id)
|
||||||
.ConfigureAwait(false);
|
{
|
||||||
|
ItemId = eventArgs.Item?.Id.ToString()
|
||||||
|
})
|
||||||
|
.ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetItemName(BaseItemDto item)
|
private static string GetItemName(BaseItemDto item)
|
||||||
|
|
|
@ -73,7 +73,10 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session
|
||||||
GetItemName(item),
|
GetItemName(item),
|
||||||
eventArgs.DeviceName),
|
eventArgs.DeviceName),
|
||||||
notificationType,
|
notificationType,
|
||||||
user.Id))
|
user.Id)
|
||||||
|
{
|
||||||
|
ItemId = eventArgs.Item?.Id.ToString()
|
||||||
|
})
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user