Emby-ScripterX icon indicating copy to clipboard operation
Emby-ScripterX copied to clipboard

action request: onUserModifyFavorite

Open solajim opened this issue 1 year ago • 1 comments

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

solajim avatar Oct 22 '23 00:10 solajim

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.

solajim avatar Oct 22 '23 02:10 solajim