Emby-ScripterX
Emby-ScripterX copied to clipboard
action request: onUserModifyFavorite
Is your feature request related to a problem? Please describe. No
Describe the solution you'd like A new action that is triggered when a user favorites or unfavorites something. I'd like to use the action to execute some API calls to determine if the favorited item is in my library already, and if not, then do some magic to get it added. This would mainly be used in the Trailers plugin.
Describe alternatives you've considered The other solution is to spin up a webhook endpoint with Node.js or maybe Flask that works via localhost, but that has two drawbacks: 1 - it requires running a servlet 2 - it wouldn't be able to be packaged within Scripter-X for others to use
As a workaround, I'll probably end up guiding users to add things they want to a list called "wishlist" (playlist updates trigger onMediaItemUpdated), but it's not as clean of a solution as just hitting the favorite button
finally managed to get a payload from the onMediaItemUpdated - it doesn't actually tell you the item that was added to the playlist. so, not really a workaround.