Jump to content

Events are triggered twice


Recommended Posts

Posted

Hello

Very often (almost always) each start of a play triggers two events the result is :

 

home automation events are triggered twice

 

notification for start of a play is received twice.


as this occurs in notification AND in webhooks this let me thinks that this an obscure bug somewhere inside the core

Posted

Hi there, let's look at an example:

 

Thanks.

Posted (edited)

Ok here are some details @Luke :

 

1) I use on my main install emby stable 4.6.7.0 on a debian linux system

2) I have activated webhooks (as i work for a home automation software, i have lots of home automation at home)


3) I also activated to be notified whenever the kids profile starts a movie/episode and so on

The players are most of the time a nvidia shield

 

What i can notice is that events are triggered twice for the start playback event. I noticed it because i receive in the same seconds each time two notifications and my home automation receives two events

2022-01-20 15:24:32.423 Info App: User policy for Léo. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
2022-01-20 15:24:32.424 Info Server: http/1.1 Response 200 to 192.168.1.88. Time: 2ms. http://192.168.1.9:8096/emby/Items/76957/PlaybackInfo?format=json
2022-01-20 15:24:32.614 Info Server: http/1.1 POST http://192.168.1.9:8096/emby/Sessions/Playing. UserAgent: Dalvik/2.1.0 (Linux; U; Android 11; SHIELD Android TV Build/RQ1A.210105.003)
2022-01-20 15:24:32.616 Info SessionManager: Playback start reported by app AndroidTv 2.0.48g playing Mighty Pups, La Super Patrouille. Started at 0 ms
2022-01-20 15:24:32.616 Info PlaybackReporting - EventMonitorEntryPoint: _sessionManager_PlaybackStart : Entered
2022-01-20 15:24:32.616 Info PlaybackReporting - EventMonitorEntryPoint: Adding PlaybackInfo to playback_trackers : 608372b9e487d993-0a3ba48c28f94959947beb7c389a0752-76957
2022-01-20 15:24:32.616 Info PlaybackReporting - EventMonitorEntryPoint: Saving PlaybackInfo to DB
2022-01-20 15:24:32.616 Info Server: http/1.1 Response 204 to 192.168.1.88. Time: 2ms. http://192.168.1.9:8096/emby/Sessions/Playing
2022-01-20 15:24:32.638 Info Trakt: Playback Started
2022-01-20 15:24:32.638 Info Trakt: Could not match user with any stored credentials
++++++++2022-01-20 15:24:32.638 Info HttpClient: POST https://XXXX.com/plugins/emby/core/php/jeeEmby.php?apikey=XXXXXXX
++++++++2022-01-20 15:24:32.639 Info HttpClient: POST https://api.telegram.org/botXXXXXX:XXXXXn1OanY/sendmessage?chat_id=-XXXXXXX&text=L%C3%A9o%20est%20en%20train%20de%20lire%20Mighty%20Pups%2C%20La%20Super%20Patrouille%20sur%20S%C3%A9jour%20-%20Shield
2022-01-20 15:24:37.580 Info Server: http/1.1 GET http://192.168.1.9:8096/emby/Items/76957/Images/Logo?Accept=webp&MaxWidth=440&EnableImageEnhancers=true&Tag=38bdfd0e8d45881116fd886e4c2a9044. UserAgent: Dalvik/2.1.0 (Linux; U; Android 11; SHIELD Android TV Build/RQ1A.210105.003)
2022-01-20 15:24:37.585 Info Server: http/1.1 Response 200 to 192.168.1.88. Time: 5ms. http://192.168.1.9:8096/emby/Items/76957/Images/Logo?Accept=webp&MaxWidth=440&EnableImageEnhancers=true&Tag=38bdfd0e8d45881116fd886e4c2a9044
2022-01-20 15:24:37.593 Info Server: http/1.1 GET http://192.168.1.9:8096/emby/Items/76957/ThumbnailSet?format=json. UserAgent: Dalvik/2.1.0 (Linux; U; Android 11; SHIELD Android TV Build/RQ1A.210105.003)
2022-01-20 15:24:37.597 Info Server: http/1.1 Response 200 to 192.168.1.88. Time: 3ms. http://192.168.1.9:8096/emby/Items/76957/ThumbnailSet?format=json
2022-01-20 15:24:41.334 Info Server: http/1.1 POST http://192.168.1.9:8096/emby/Sessions/Playing. UserAgent: Dalvik/2.1.0 (Linux; U; Android 11; SHIELD Android TV Build/RQ1A.210105.003)
2022-01-20 15:24:41.335 Info SessionManager: Playback start reported by app AndroidTv 2.0.48g playing Mighty Pups, La Super Patrouille. Started at 0 ms
2022-01-20 15:24:41.335 Info Server: http/1.1 Response 204 to 192.168.1.88. Time: 1ms. http://192.168.1.9:8096/emby/Sessions/Playing
2022-01-20 15:24:41.335 Info PlaybackReporting - EventMonitorEntryPoint: _sessionManager_PlaybackStart : Entered
2022-01-20 15:24:41.335 Info Trakt: Playback Started
2022-01-20 15:24:41.335 Info Trakt: Could not match user with any stored credentials
++++++++2022-01-20 15:24:41.336 Info HttpClient: POST https://XXXXXX.com/plugins/emby/core/php/jeeEmby.php?apikey=XXXXXXXXX
++++++++2022-01-20 15:24:41.336 Info HttpClient: POST https://api.telegram.org/botXXXX:XXXXXX/sendmessage?chat_id=-XXXX&text=L%C3%A9o%20est%20en%20train%20de%20lire%20Mighty%20Pups%2C%20La%20Super%20Patrouille%20sur%20S%C3%A9jour%20-%20Shield
2022-01-20 15:24:41.445 Info Server: http/1.1 GET http://192.168.1.9:8096/emby/videos/76957/stream.mkv?DeviceId=608372b9e487d993&MediaSourceId=b3b3461a02b81aee7b652e1acf9dc6c0&Static=true&PlaySessionId=2687fdefe883429d963671fd4d1a7e0b. Connection=Keep-Alive, Accept-Encoding=identity, Host=192.168.1.9:8096, User-Agent=Emby/2.0.48g (Linux;Android 11) ExoPlayerLib/2.13.2, Icy-MetaData=1
2022-01-20 15:24:41.450 Info Server: http/1.1 GET http://192.168.1.9:8096/emby/Items/76957/ThumbnailSet?format=json. UserAgent: Dalvik/2.1.0 (Linux; U; Android 11; SHIELD Android TV Build/RQ1A.210105.003)
2022-01-20 15:24:41.451 Info Server: http/1.1 Response 200 to 192.168.1.88. Time: 1ms. http://192.168.1.9:8096/emby/Items/76957/ThumbnailSet?format=json
2022-01-20 15:24:41.561 Info Server: http/1.1 Response 200 to 192.168.1.88. Time: 116ms. http://192.168.1.9:8096/emby/videos/76957/stream.mkv?DeviceId=608372b9e487d993&MediaSourceId=b3b3461a02b81aee7b652e1acf9dc6c0&Static=true&PlaySessionId=2687fdefe883429d963671fd4d1a7e0b

Here you can clearly see that the playback start routine is done twice in a row  (i marked the lines with +++++++). It seems that it is the android client that report twice but as i dont have the code i cant see if the core handles it two times/ if it really was sent two times by the client ATV app/ or if the core could ignore the second one when it occurs

 

You can see that the webhook is triggered twice AND also the notification is sent twice

 

Thanks for your feedback

Edited by Sarakha63
Posted

OK please create a topic about this in the android tv section for @ebr to review. Thanks.

Posted
4 minutes ago, Luke said:

OK please create a topic about this in the android tv section for @ebr to review. Thanks.

ok done

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...