Closed nimbleghost closed 1 year ago
I have noticed that the lights will change a second or two before the end credits happens both on movies and tv shows. Not sure why Plex chose to send the webhook slightly early. If I had to guess a reason, it is because the scrobble function is meant for sending signals to platforms like Trakt to indicate that something has been watched and they might push out the webhook early in case the user wants to stop the stream as soon as they see credits and they want to make sure the services are notified before that happens. Just a guess though.
Since HuePlex is dependent on the webhook the only solution at this point would be to do what you suggest, to add a delay option. I'm not sure if a delay is particularly necessary on all of the other functions (unless you've seen behavior to the contrary), so it may just be okay to have it on scrobble as to not clutter up the selection page too much.
I don't want to blanket add the delay on the backend as some people might not want it, so I'll add a selection item as an option with maybe selections from half a second to 5 seconds with half-second intervals. I don't want it to be a fill-in option because if someone screws up and puts in a really long interval by accident it will require a restart of the app.
I was planning this week to add a few other features, like time schedules for when the profiles will be active, and I want to create a global settings page as well so that you can not only change settings for each profile, but globally as well if you choose. I can add in this feature to that release, but I'm going to try and get a hot-fix out for the other issue you gave for the zones.
Yeah, a value with a narrow range for just the scrobble event seems like a good solution! I'd like to work on this if that's okay, now that we're aligned on the details.
Sure. If you wanna take a stab at it I'll set you up a feature branch and give you access to it, that way when you push to it the build server will build it and create a tag for that branch on Docker Hub for you to test locally. I personally work locally for easier testing before pushing it to GitHub. If you go through the Native install (https://github.com/chadwpalm/HuePlex/wiki/Installation#native) you can run HuePlex locally for testing that way. The gitignore will keep the node-modules from uploading to GitHub when you do decide to push. I don't think you will have merge capabilities, so when you are done please do a pull request and I'll merge it in and bump the rev.
A couple things to keep in mind:
Thanks for the pointers. Will look into this later today.
This could be a quirk of Plex's end credits detection, but in my experience watching a few things with HuePlex enabled, the scene is activated approx. a few seconds (I'd have to measure) before the episode ends. This can be a little jarring, as it can ruin a cliffhanger (e.g. you know the episode is imminently ending a few seconds before it actually does).
I wonder if adding a configurable delay, perhaps per-event, would be a good idea. e.g. I could configure a 3 second delay only on scrobble. I'd be happy to contribute this! It could be a simple
setTimeout
after receiving the webhook payload.I'm also curious to hear your experience with the end credits / scrobble event on your setup.