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
76 stars 6 forks source link

Package event handler documented incorrectly #32

Closed Slugger closed 4 years ago

Slugger commented 4 years ago

Describe the bug Packages wiki says to create event handler _onAuthenticationFailed(context) so I assumed that meant to prefix every event handler with an underscore. But then my event handlers weren't called (well _package_init() is called but not _onScheduledTask()). When I renamed it to just onScheduledTask() it was then called.

To Reproduce Steps to reproduce the behavior:

  1. Follow wiki docs for creating packages
  2. Trigger an event to call a handler in your package

Expected behavior Handler is called

Screenshots n/a

Desktop (please complete the following information): n/a

Smartphone (please complete the following information): n/a

Additional context The wiki docs just aren't clear on how to name event handler functions. After some trial and error and the enabled debug logging, I got it figured out. I'm going with the functioning sol'n and not the wiki. I assume you'll be keeping the event handlers without the underscore? :)

AnthonyMusgrove commented 4 years ago

Thank you mate for reporting this. This was purely my fault. I've fixed this in the next release (I just can't release it on the catalog at the moment because the catalog portal is down for maintenance). I can attach the fixed DLL here if you like.

Release notes for this ver will be:

v3.0.3.5

General

AnthonyMusgrove commented 4 years ago

Because it's so new (its the newest part of ScripterX) it isn't well documented yet, but I am going to sit down and map the wiki out for it because I know it's much needed, its so exciting though, because of the power it gives to be able to script and customise everything. I'll also be adding User manipulation functionality too