Add PlayMethod variable (#197)

As requested in https://github.com/jellyfin/jellyfin-plugin-webhook/issues/183

To see if the user is transcoding or not. Returns either "Transcode", "Direct Stream"  or "Direct Play".
This commit is contained in:
desileR 2023-10-04 18:31:54 +02:00 committed by GitHub
parent b78515afd6
commit 51833842b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -273,6 +273,11 @@ public static class DataObjectHelpers
dataObject[nameof(playbackProgressEventArgs.DeviceName)] = playbackProgressEventArgs.DeviceName;
dataObject[nameof(playbackProgressEventArgs.ClientName)] = playbackProgressEventArgs.ClientName;
if (playbackProgressEventArgs.Session is not null && playbackProgressEventArgs.Session.PlayState?.PlayMethod is not null)
{
dataObject["PlayMethod"] = playbackProgressEventArgs.Session.PlayState.PlayMethod;
}
return dataObject;
}