m7eesn 10 Posted June 17, 2022 Share Posted June 17, 2022 Hello, Using Emby 4.7.2.0, it seems the webhook plugin no longer sends playback.scrobble event, the server is able to receive all the playback events like start/stop/pause/unpause. however scrobble is not firing. Right now as workaround, i use playback.stop to parse PlaybackInfo.PlayedToCompletion. and this is really not ideal situation. Link to comment Share on other sites More sharing options...
Luke 37161 Posted June 17, 2022 Share Posted June 17, 2022 Hi, why is that not ideal? Link to comment Share on other sites More sharing options...
m7eesn 10 Posted June 17, 2022 Author Share Posted June 17, 2022 Its not explicit action that indicate the item has been watched like for example plex, the payload does not contain LastPlayedDate either. Link to comment Share on other sites More sharing options...
GrimReaper 3322 Posted June 17, 2022 Share Posted June 17, 2022 Not sure why do you feel that way, you can parse both those data from playback.stop webhook, timestamp and PlayedToCompletion, which is exactly what I've been doing with Notifiarr notifications. Link to comment Share on other sites More sharing options...
Luke 37161 Posted June 17, 2022 Share Posted June 17, 2022 So you don't want to parse the payload? Link to comment Share on other sites More sharing options...
m7eesn 10 Posted June 17, 2022 Author Share Posted June 17, 2022 (edited) No, That's not what i said, i said it's not explicit action, stop could mean played to completion or not, it's not Yes the item surely played mark it as such. and do the necessary extra things 11 minutes ago, GrimReaper said: Not sure why do you feel that way, you can parse both those data from playback.stop webhook, timestamp and PlayedToCompletion, which is exactly what I've been doing with Notifiarr notifications. Im not sure where the timestamp is in the webhook payload the only thing date related is DateCreated which point to when the item added afaik and for some reason, playback.pause fires before playback.stop even though there is no pause involved. This is the payload im receiving { "Event": "playback.stop", "User": { "Name": "snip", "Id": "snip" }, "Item": { "Name": "The Monster-Taming Barbarian Laughs in the Darkness", "ServerId": "snip", "Id": "344165", "DateCreated": "2022-06-16T15:20:39.0000000Z", "PresentationUniqueKey": "snip", "Container": "mkv", "PremiereDate": "2022-06-16T00:00:00.0000000Z", "ExternalUrls": [ { "Name": "IMDb", "Url": "https://www.imdb.com/title/tt20881664" }, { "Name": "TheTVDB", "Url": "https://thetvdb.com/?tab=episode&id=9075229" }, { "Name": "Trakt", "Url": "https://trakt.tv/search/imdb/tt20881664" } ], "Path": "/storage/media/anime/Show Title (2022)/Season 01/Show Title - S01E11.mkv", "Taglines": [], "Genres": [], "RunTimeTicks": 14305000000, "Bitrate": 8148610, "ProductionYear": 2022, "IndexNumber": 11, "ParentIndexNumber": 1, "ProviderIds": { "Tvdb": "9075229", "Imdb": "tt20881664" }, "IsFolder": false, "ParentId": "317486", "Type": "Episode", "Studios": [], "GenreItems": [], "ParentLogoItemId": "260002", "ParentBackdropItemId": "260002", "ParentBackdropImageTags": [ "2858ff10b7ac6f47ed390517cd137f10" ], "SeriesName": "Skeleton Knight in Another World", "SeriesId": "260002", "SeasonId": "317486", "PrimaryImageAspectRatio": 1.7777777777777777, "SeriesPrimaryImageTag": "589e8be84b94a979175354b9e21726bd", "SeasonName": "Season 1", "MediaStreams": [], "ImageTags": { "Primary": "70b6002e8182c2a03ef1eb4583274769" }, "BackdropImageTags": [], "ParentLogoImageTag": "0db0fad714911c7884a2f09fa7bbb781", "ParentThumbItemId": "260002", "ParentThumbImageTag": "b4a2032db0f4f65bb05acc805aef0cff", "Chapters": [], "MediaType": "Video", "Width": 1920, "Height": 1080 }, "Server": { "Name": "snip", "Id": "snip" }, "Session": { "RemoteEndPoint": "snip", "Client": "Emby for Windows", "DeviceName": "snip", "DeviceId": "snip", "ApplicationVersion": "1.1.420.0", "Id": "snip" }, "PlaybackInfo": { "PlayedToCompletion": false, "PositionTicks": 12663608, "PlaylistIndex": 0, "PlaylistLength": 1 } } Edited June 17, 2022 by m7eesn Link to comment Share on other sites More sharing options...
GrimReaper 3322 Posted June 17, 2022 Share Posted June 17, 2022 1 minute ago, m7eesn said: playback.pause fires before playback.stop even though there is no pause involved. Had same issue with pause trigger, had to weigh PositionTicks against RunTimeTicks to decide whether to discard it or not. Link to comment Share on other sites More sharing options...
m7eesn 10 Posted June 17, 2022 Author Share Posted June 17, 2022 I already fixed it by parsing said event. It just feels not ideal and having explicit event is surely better. @luke i think this all could be avoided with better documentation in relation to webhooks events and their payloads. it seems i just assumed playback.scrobble still works as there are some posts reporting this event. Link to comment Share on other sites More sharing options...
Luke 37161 Posted June 17, 2022 Share Posted June 17, 2022 I guess the question is how much redundancy do we need. But yes, totally agree on improving documentation. 1 Link to comment Share on other sites More sharing options...
m7eesn 10 Posted June 17, 2022 Author Share Posted June 17, 2022 13 minutes ago, Luke said: I guess the question is how much redundancy do we need. But yes, totally agree on improving documentation. Indeed. I am working on this tool https://github.com/ArabCoders/watchstate which sync the play state and the only thing missing in Emby implementation right now is the ability to register new items on webhook event, having to fallback to pulling items off the API is rather costly in term of time and bandwidth. Link to comment Share on other sites More sharing options...
GrimReaper 3322 Posted June 17, 2022 Share Posted June 17, 2022 55 minutes ago, m7eesn said: the only thing missing in Emby implementation right now is the ability to register new items on webhook event, having to fallback to pulling items off the API is rather costly in term of time and bandwidth. Lend your support here: Link to comment Share on other sites More sharing options...
m7eesn 10 Posted June 17, 2022 Author Share Posted June 17, 2022 1 minute ago, GrimReaper said: Lend your support here: oh i already did 3 months ago Link to comment Share on other sites More sharing options...
GrimReaper 3322 Posted June 17, 2022 Share Posted June 17, 2022 (edited) 4 minutes ago, m7eesn said: oh i already did 3 months ago Like the first post, don't see you there. Quote Feature Requests Please search for your request before posting. It may already exist. "Like" the posts of the thread starter to vote for a request. Thanks. Edited June 17, 2022 by GrimReaper QTE Link to comment Share on other sites More sharing options...
m7eesn 10 Posted June 17, 2022 Author Share Posted June 17, 2022 Sorry i am fairly new to emby, and dont know how the voting works. Anyway i +1 it 1 Link to comment Share on other sites More sharing options...
Luke 37161 Posted July 2, 2022 Share Posted July 2, 2022 On 6/17/2022 at 1:48 PM, m7eesn said: Sorry i am fairly new to emby, and dont know how the voting works. Anyway i +1 it Hi, were you able to use the dedicated playback stop event? Link to comment Share on other sites More sharing options...
m7eesn 10 Posted July 3, 2022 Author Share Posted July 3, 2022 (edited) 12 hours ago, Luke said: Hi, were you able to use the dedicated playback stop event? Indeed i was able to. I thought of something, could you just extend the already existing markplayed event to fire as well when the media marked as watched? technically the event is appropriate in this case as well. so we can ignore all playback events and focus on just item.markplayed and item.markunplayed. and hopefully item.added event in the future. Edited July 3, 2022 by m7eesn Link to comment Share on other sites More sharing options...
Luke 37161 Posted July 4, 2022 Share Posted July 4, 2022 Essentially you're just asking if we can bring the scrobble event back but give it a name of markplayed. Is that much redundancy really needed, as opposed to just using the information in playback stop? Link to comment Share on other sites More sharing options...
m7eesn 10 Posted July 5, 2022 Author Share Posted July 5, 2022 6 hours ago, Luke said: Essentially you're just asking if we can bring the scrobble event back but give it a name of markplayed. Is that much redundancy really needed, as opposed to just using the information in playback stop? Honestly, i think having dedicated event is the best option. For example you could fire this event when the user watched 90% of the episode/movie like plex it doesn’t have to happen at 100% you could even make it configurable and let the user decide when the item is marked as watched. Any way it’s up to emby team if they think it’s worth it. i already made the adjustment to work with playback.stop 1 Link to comment Share on other sites More sharing options...
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