Closed McCloudS closed 10 months ago
Example library.new from Emby:
ImmutableMultiDict([('data', '{"Title":"New 10 Things I Hate About You - Cars on Emby Server","Date":"2023-10-26T03:11:25.6926771Z","Event":"library.new","Item":{"Name":"Cars","ServerId":"2965b319f8a849ebb156e4ea01e9a5c5","Id":"5808","DateCreated":"2023-10-26T03:10:32.1268687Z","SortName":"Cars","ExternalUrls":[],"Path":"/mnt/user/TV/10 Things I Hate About You/Cars.strm","Taglines":[],"Genres":[],"FileName":"Cars.strm","RemoteTrailers":[],"ProviderIds":{},"IsFolder":false,"Type":"Episode","Studios":[],"GenreItems":[],"TagItems":[],"SeriesName":"10 Things I Hate About You","SeriesId":"6","SeriesPrimaryImageTag":"95bd99feb1c92c7cb3922c6aa5db3f63","ImageTags":{},"BackdropImageTags":[],"MediaType":"Video"},"Server":{"Name":"Tower","Id":"2965b319f8a849ebb156e4ea01e9a5c5","Version":"4.7.14.0"}}')])
Emby is really nice and doesn't require an API key or server because they return all the info we need in the webhook outright! https://github.com/McCloudS/subgen/blob/93fbf5e7649a7b609e64cf443009b5a526d34ccf/subgen/subgen.py#L149-L173
Example playback.start from Emby:
ImmutableMultiDict([('data', '{"Title":"Scott has finished playing Billy the Kid - S2, Ep1 - The Road to Hell on Chrome macOS","Date":"2023-10-26T03:11:02.4880527Z","Event":"playback.stop","User":{"Name":"Scott","Id":"961f390f0306415687d24263559594ab"},"Item":{"Name":"The Road to Hell","ServerId":"2965b319f8a849ebb156e4ea01e9a5c5","Id":"478","DateCreated":"2023-10-16T04:00:00.0000000Z","Container":"mkv","SortName":"Road to Hell","PremiereDate":"2023-10-15T07:00:00.0000000Z","ExternalUrls":[{"Name":"TheTVDB","Url":"https://thetvdb.com/?tab=episode&id=9944695"}],"Path":"/mnt/user/TV/Billy the Kid/Season 02/Billy the Kid - S02E01 - The Road to Hell.mkv","Overview":"The Lincoln County War is on the verge of kicking off in a big way. Billy has joined Englishman John Tunstall in his commercial battle with Major Murphy and the House, but even bigger players lurk in the background and the stakes are high.","Taglines":[],"Genres":[],"RunTimeTicks":28512110000,"Size":275927118,"FileName":"Billy the Kid - S02E01 - The Road to Hell.mkv","Bitrate":774203,"PlayAccess":"Full","ProductionYear":2023,"IndexNumber":1,"ParentIndexNumber":2,"RemoteTrailers":[],"ProviderIds":{"Tvdb":"9944695"},"IsFolder":false,"ParentId":"477","Type":"Episode","Studios":[],"GenreItems":[],"TagItems":[],"ParentLogoItemId":"44","ParentBackdropItemId":"44","ParentBackdropImageTags":["ee06fe740a11ec9944c619e9f95d86ea"],"SeriesName":"Billy the Kid","SeriesId":"44","SeasonId":"477","PrimaryImageAspectRatio":1.7777777777777777,"SeriesPrimaryImageTag":"ebc8cb7fe2cd3a97fdfa728a86872bff","SeasonName":"Season 2","ImageTags":{"Primary":"fd5c872d31d9973d331bc2f0dc355a72"},"BackdropImageTags":[],"ParentLogoImageTag":"80d339a1912f731bce717291b4933c0e","ParentThumbItemId":"44","ParentThumbImageTag":"789f8891b1ad000a8cdede46e75e0155","MediaType":"Video","Width":1280,"Height":720},"Server":{"Name":"Tower","Id":"2965b319f8a849ebb156e4ea01e9a5c5","Version":"4.7.14.0"},"Session":{"RemoteEndPoint":"192.168.1.154","Client":"Emby Web","DeviceName":"Chrome macOS","DeviceId":"TW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTBfMTVfNykgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzExNy4wLjAuMCBTYWZhcmkvNTM3LjM2fDE2OTgwOTg4NTIwMTI1","ApplicationVersion":"4.7.14.0","Id":"81c1dc32bdec8bcce23056e6668cf267"},"PlaybackInfo":{"PlayedToCompletion":false,"PositionTicks":13654655720,"PlaylistIndex":0,"PlaylistLength":2}}')])