GrimReaper 4138 Posted May 30, 2021 Posted May 30, 2021 Been doing some tests with Notifiarr Dev for Emby integration, which has just gone live in early stage as of last night. With the obvious lack of " New content added" webhook, here's few of the observations: 1. While Playback events do work, per se: Triple webhook (Pause/Stop/Scrobble) is sent upon Playback finished: Could you adjust above so that only scrobble is sent upon finish? 2. System events also function but are fairly limited in info provided: Could you append same with some additional data? 3. Same goes for User events, which also do get through: However, same webhook is sent upon "Mark favorite" and "Unmark favorite", so there's no way to distinguish which event actually occurred. Sidenote: Had a good laugh on some of the notification descriptions when I saw them for the first time, Dev's got some spirit there. 1 1
Luke 40063 Posted May 30, 2021 Posted May 30, 2021 Hi, it will be to be reported individually to each app that it is happening with as the server is simply just relaying events provided to it by the player.
GrimReaper 4138 Posted June 3, 2021 Author Posted June 3, 2021 On 5/30/2021 at 9:19 PM, Luke said: Hi, it will be to be reported individually to each app that it is happening with as the server is simply just relaying events provided to it by the player. Ok, here's both: Triple webhook sent on Playback finished - Web App - Emby Community Double webhook sent on Playback finished - Android TV / Fire TV - Emby Community Cheers
ryzilla 11 Posted November 21, 2021 Posted November 21, 2021 Yeah this is awesome playing around now, i need to use sonarr radarr for new content which is all i really use it for, but will be great once it is added! 1
johnnycash 1 Posted February 16, 2022 Posted February 16, 2022 On 5/30/2021 at 1:48 PM, GrimReaper said: However, same webhook is sent upon "Mark favorite" and "Unmark favorite", so there's no way to distinguish which event actually occurred. Additionally: the same webhhook is also sent upon change of seen/unseen status, so in this state the webhook is pretty useless. Regards
johnnycash 1 Posted February 17, 2022 Posted February 17, 2022 You have to parse the entire payload to get the items id and then in a second step you can query the item's seen or favorite status. This could also be easier.
Luke 40063 Posted March 9, 2022 Posted March 9, 2022 The fact that pause happens right before the stop is not a fault of the server and simply due to the way the audio/video players stop on the client-side. They are in fact, stopping, which must trigger a pause event first, followed by stop. That really should be cleaned up individually in each app to have special handling to not fire that when we know we're stopping. Having said that, I don't think it's a big issue. 1
Luke 40063 Posted March 9, 2022 Posted March 9, 2022 Regarding stop and scrobble, maybe we should just drop the scrobble event and add more information to the stop event to indicate if it was played to completion. 1
Luke 40063 Posted March 9, 2022 Posted March 9, 2022 @GrimReaper Please try this version of the webhooks plugin. It adds a new PlaybackInfo object containing some information: PlayedToCompletion PositionTicks PlaylistIndex PlaylistLength PlaylistItemIdEmby.Webhooks.zip
nitsua 5 Posted March 10, 2022 Posted March 10, 2022 (edited) Would it be to much of an ask to include the webhook response in the logs to know it reached the destination? This one he is testing is not creating any logs what so ever which means it isn't leaving his server. He rolled back to the old one and it started creating logs so there is for sure some kinda issue here. By logs i am referring to Notifiarr side logs that are generated for every incoming request Edited March 10, 2022 by nitsua 1
GrimReaper 4138 Posted March 10, 2022 Author Posted March 10, 2022 3 hours ago, Luke said: @GrimReaper Please try this version of the webhooks plugin. It adds a new PlaybackInfo object containing some information: PlayedToCompletion PositionTicks PlaylistIndex PlaylistLength PlaylistItemIdEmby.Webhooks.zip Tried with the updated Webhooks plugin, besides Test event, no Playback events are going out, no webhook POSTs in the log. Once downgraded/reverted, all is back in order.
Luke 40063 Posted March 10, 2022 Posted March 10, 2022 Sorry, my mistake. Please try this version:Emby.Webhooks.zip Thanks. 1
nitsua 5 Posted March 10, 2022 Posted March 10, 2022 1 hour ago, Luke said: Sorry, my mistake. Please try this version:Emby.Webhooks.zip Thanks. Is PlaybackInfo.PositionTicks supposed to be the current ticks or overall ticks? If it is current ticks then i can look at RunTimeTicks and compare to it with the pause notifications and skip them if they are the same since it is immediately followed by a stop hook. 1
Luke 40063 Posted March 10, 2022 Posted March 10, 2022 1 minute ago, nitsua said: Is PlaybackInfo.PositionTicks supposed to be the current ticks or overall ticks? If it is current ticks then i can look at RunTimeTicks and compare to it with the pause notifications and skip them if they are the same since it is immediately followed by a stop hook. I wouldn't necessarily suggest that, but if you really want to, it might be ok.
nitsua 5 Posted March 10, 2022 Posted March 10, 2022 (edited) 1 hour ago, Luke said: I wouldn't necessarily suggest that, but if you really want to, it might be ok. Hmm, that doesn't clarify the question at all. I would need to know the answer before i can consider it. For a user who has Stop and Pause enabled, i dont need to double send them. If they dont have stop enabled but do have pause then it can send them. So if PlaybackInfo.PositionTicks is current ticks then this will work to eliminate a needless notification. Sidenotes: Can you fix Server.Name to be actually right instead of "Emby Server" or just flat out missing in some webhooks? Can you add a flag to differentiate favorite/unfavorite? Can you add a flag to differentiate seen/unseen? Edited March 10, 2022 by GrimReaper Strikethrough 1
Luke 40063 Posted March 10, 2022 Posted March 10, 2022 14 minutes ago, nitsua said: Hmm, that doesn't clarify the question at all. I would need to know the answer before i can consider it. For a user who has Stop and Pause enabled, i dont need to double send them. If they dont have stop enabled but do have pause then it can send them. So if PlaybackInfo.PositionTicks is current ticks then this will work to eliminate a needless notification. Sidenotes: Can you fix Server.Name to be actually right instead of "Emby Server" or just flat out missing in some webhooks? Can you add a flag to differentiate favorite/unfavorite? Can you add a flag to differentiate seen/unseen? The Server object is set on every single webhook that goes out. Yes I'll fix the Name. 1
nitsua 5 Posted March 10, 2022 Posted March 10, 2022 17 minutes ago, Luke said: The Server object is set on every single webhook that goes out. Yes I'll fix the Name. Thanks, also ignore the comment about fixing Seen/Unseen as Grim mentioned Notifiarr notifications already tell them apart. I was just mentioning what i saw earlier in the thread. So really it is just favorite/unfavorite that it cant tell apart. And the lack of any information in the plugin payloads and the restart pending payload. 1
Luke 40063 Posted March 10, 2022 Posted March 10, 2022 7 minutes ago, nitsua said: Thanks, also ignore the comment about fixing Seen/Unseen as Grim mentioned Notifiarr notifications already tell them apart. I was just mentioning what i saw earlier in the thread. So really it is just favorite/unfavorite that it cant tell apart. And the lack of any information in the plugin payloads and the restart pending payload. Lack of what information? ?Those system events don't have a user, session or library item attached because there isn't one.
GrimReaper 4138 Posted March 10, 2022 Author Posted March 10, 2022 3 minutes ago, Luke said: Lack of what information? ?Those system events don't have a user, session or library item attached because there isn't one. But it is surely known which plugin is updated and what is the reason for Server restart required?
nitsua 5 Posted March 10, 2022 Posted March 10, 2022 2 minutes ago, Luke said: Lack of what information? ?Those system events don't have a user, session or library item attached because there isn't one. system.serverrestartrequired - New version? Plugin required it? What triggered the need for a restart system.plugininstalled - Version? Plugin name? Automatic install (If that is a thing such as a dependancy) or user generated? system.pluginuninstalled - Plugin name? Automatic uninstall (if that is a thing such as a security reason) or user generated? system.pluginupdated - New version? Old version? Plugin name? Automatic update or user generated? As a user i would like to know when things change yes, but also what changed. I dont have a dog in this race as i dont use Emby but your Emby users ask for this kind of information when they see it in other apps but not here.
Luke 40063 Posted March 11, 2022 Posted March 11, 2022 4 hours ago, nitsua said: system.serverrestartrequired - New version? Plugin required it? What triggered the need for a restart system.plugininstalled - Version? Plugin name? Automatic install (If that is a thing such as a dependancy) or user generated? system.pluginuninstalled - Plugin name? Automatic uninstall (if that is a thing such as a security reason) or user generated? system.pluginupdated - New version? Old version? Plugin name? Automatic update or user generated? As a user i would like to know when things change yes, but also what changed. I dont have a dog in this race as i dont use Emby but your Emby users ask for this kind of information when they see it in other apps but not here. Yes those are good ideas. Thanks for the feedback.
nitsua 5 Posted March 11, 2022 Posted March 11, 2022 13 hours ago, Luke said: Yes those are good ideas. Thanks for the feedback. Np bud. Transcode information is also something highly requested for Emby & JF since it is available in the Plex notifications. You're welcome to add me on discord or hop in the Notifiarr server if you want to discuss things. 1
Luke 40063 Posted March 11, 2022 Posted March 11, 2022 Sure, I will add transcoding information in the coming days and push out an update to the webhooks plugin. Thanks. 1
Luke 40063 Posted March 14, 2022 Posted March 14, 2022 On 3/11/2022 at 12:16 PM, Luke said: Sure, I will add transcoding information in the coming days and push out an update to the webhooks plugin. Thanks. A webhooks plugin update went out for this, although I've limited it to 4.7 servers for now. 1
GrimReaper 4138 Posted March 14, 2022 Author Posted March 14, 2022 1 hour ago, Luke said: A webhooks plugin update went out for this, although I've limited it to 4.7 servers for now. Tested updated Webhooks (1.0.18.0) with beta .30, no Playback method/Transcoding info in payload (or at least none that we can make sense of): { "Event": "playback.start", "User": { "Name": "GrimReaper", "Id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, "Item": { "Name": "The Truth", "ServerId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "Id": "608", "DateCreated": "2021-12-01T18:54:08.0000000+00:00", "PresentationUniqueKey": "xxxxx-en-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxx - xxxx", "Container": "mkv", "PremiereDate": "2016-03-13T23:00:00.0000000+00:00", "ExternalUrls": [{ "Name": "IMDb", "Url": "https://www.imdb.com/title/tt5432602" }, { "Name": "TheTVDB", "Url": "https://thetvdb.com/?tab=episode&id=5482173" }, { "Name": "Trakt", "Url": "https://trakt.tv/search/tmdb/1161838?id_type=episode" }], "Path": "Z:\\[DL]\\Test\\TV\\11.22.63 (2016)\\Season 1\\11.22.63.S01E05.The.Truth.720p.10bit.BluRay.2CH.x265.mkv", "Overview": "Everything begins to fall apart as Jake struggles to live two lives: teacher and time traveler. When Sadie's life is threatened, Jake has to make a terrible choice, leaving Bill to his own devices. Lee Harvey Oswald takes steps that will lead him into a date with destiny.", "Taglines": [], "Genres": [], "CommunityRating": 8.2, "RunTimeTicks": 26268330000, "Bitrate": 608996, "ProductionYear": 2016, "IndexNumber": 5, "ParentIndexNumber": 1, "ProviderIds": { "Tmdb": "1161838", "TvRage": "1065881286", "Imdb": "tt5432602", "Tvdb": "5482173", "trakt": "2042777" }, "IsFolder": false, "ParentId": "603", "Type": "Episode", "Studios": [{ "Name": "Carpenter B", "Id": 697 }, { "Name": "Bad Robot", "Id": 698 }, { "Name": "Warner Bros. Television", "Id": 699 }], "GenreItems": [], "ParentLogoItemId": "602", "ParentBackdropItemId": "602", "ParentBackdropImageTags": ["f68f445f7b7f5ff0af98ca3d28beb403"], "SeriesName": "11.22.63", "SeriesId": "602", "SeasonId": "603", "PrimaryImageAspectRatio": 1.7777777777777777, "SeriesPrimaryImageTag": "ba73744d73ae58253d80744f170b4b65", "SeasonName": "Season 1", "MediaStreams": [{ "Codec": "hevc", "ColorTransfer": "bt709", "ColorPrimaries": "bt709", "ColorSpace": "bt709", "TimeBase": "1/1000", "VideoRange": "SDR", "DisplayTitle": "720p HEVC", "IsInterlaced": false, "BitRate": 608996, "BitDepth": 10, "RefFrames": 1, "IsDefault": true, "IsForced": false, "Height": 640, "Width": 1280, "AverageFrameRate": 23.976025, "RealFrameRate": 23.976025, "Profile": "Main 10", "Type": "Video", "AspectRatio": "2:1", "Index": 0, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File", "PixelFormat": "yuv420p10le", "Level": 93, "IsAnamorphic": false, "AttachmentSize": 0 }, { "Codec": "aac", "TimeBase": "1/1000", "DisplayTitle": "Und AAC stereo (Default)", "IsInterlaced": false, "ChannelLayout": "stereo", "BitRate": 192000, "Channels": 2, "SampleRate": 48000, "IsDefault": true, "IsForced": false, "Profile": "HE-AAC", "Type": "Audio", "Index": 1, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File", "AttachmentSize": 0 }, { "Codec": "subrip", "TimeBase": "1/1000", "DisplayTitle": "Und (Default SUBRIP)", "IsInterlaced": false, "IsDefault": true, "IsForced": false, "Type": "Subtitle", "Index": 2, "IsExternal": false, "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File", "AttachmentSize": 0, "SubtitleLocationType": "InternalStream" }], "ImageTags": { "Primary": "63afe2595e7cecd44e844c7b7b2fb1e6" }, "BackdropImageTags": [], "ParentLogoImageTag": "7177c3a26e33721dd8c6d685fc1e72db", "ParentThumbItemId": "602", "ParentThumbImageTag": "5106700c6f8853259604ab8e52b37492", "Chapters": [{ "StartPositionTicks": 0, "Name": "Chapter 1", "MarkerType": "Chapter" }, { "StartPositionTicks": 3000000000, "Name": "Chapter 2", "MarkerType": "Chapter" }, { "StartPositionTicks": 6000000000, "Name": "Chapter 3", "MarkerType": "Chapter" }, { "StartPositionTicks": 9000000000, "Name": "Chapter 4", "MarkerType": "Chapter" }, { "StartPositionTicks": 12000000000, "Name": "Chapter 5", "MarkerType": "Chapter" }, { "StartPositionTicks": 15000000000, "Name": "Chapter 6", "MarkerType": "Chapter" }, { "StartPositionTicks": 18000000000, "Name": "Chapter 7", "MarkerType": "Chapter" }, { "StartPositionTicks": 21000000000, "Name": "Chapter 8", "MarkerType": "Chapter" }, { "StartPositionTicks": 24000000000, "Name": "Chapter 9", "MarkerType": "Chapter" }], "MediaType": "Video", "Width": 1280, "Height": 640 }, "Server": { "Name": "BLADE Beta", "Id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, "Session": { "RemoteEndPoint": "::1", "Client": "Emby Web", "DeviceName": "Google Chrome Windows", "DeviceId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "ApplicationVersion": "4.7.0.30", "Id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, "PlaybackInfo": { "PositionTicks": 0, "PlaylistIndex": 4, "PlaylistLength": 8 }, "CancellationToken": "System.Threading.CancellationToken" }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now