AnthonyMusgrove / Emby-ScripterX

Run custom external application or script (batch/bash/powershell/php/python/node.js/custom) on various events within the Emby Server.
https://emby-scripterx.com
78 stars 6 forks source link

User disconnecting #47

Open testbughub opened 4 years ago

testbughub commented 4 years ago

Is your feature request related to a problem? Please describe. Not a problem per se. The way I have it now is, when a user starts a video it writes it to a file, and when playback is stopped the file is cleared. Sometimes, some of my users disconnects before stopping the video, so it never clears.

Describe the solution you'd like A trigger for when a user disconnect.

Describe alternatives you've considered I haven't figured out a better way to clear the file than to do it manually, but that kinda ruins the whole point of this plugin.

Additional context emby

AnthonyMusgrove commented 3 years ago

Thank you @testbughub - I'll check out what we can hook into re Disconnect detection!

AnthonyMusgrove commented 3 years ago

I'm trying to replicate the issue mate. Seems at the moment every time I just 'close' the browser, it calls stopPlayback and detects that the session has been closed / user has disconnected.

I'll do more testing to see if I can get it to occur for me too!

testbughub commented 3 years ago

Yes, I've tried replicating it myself with no success, so it doens't happend alot. It could be because this user watches through his Playstation 4 browser. Not really sure what else I can provide, and it happens only like 1 out of 30 times, so it's not really that big of a deal. I was a while ago now though, so I haven't seen it for a long time since. You could close this issue if you want to. Whatever you choose to do, thank you regardless!