Multiple extension points - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: Multiple extension points (/showthread.php?tid=348740) |
Multiple extension points - Snapcase - 2019-10-26 Hi I'm trying to figure out the appropriate extension points to get the correct behaviour for my addon between plugin and script extension points. I've tried multiple variations but when I get it behaving properly, it shows up twice in Kodi... Here's where it stands:
With this approach, my addon shows up twice under programs. If I remove <script>, is there another approach to calling actions from settings.xml? Right now when I remove it it starts calling the plugin with the sys.args in a different order than when calling the script... My in-progress addon.xml is here RE: Multiple extension points - ronie - 2019-10-26 if you list the service as the first extension point in your addon.xml file, i think RunScript will execute the service instead of the plugin. RE: Multiple extension points - Snapcase - 2019-10-27 Thanks Ronie I put the service extension point first and got rid of the script extension point. The plugin and service work as before and runscript calls the service. I'll need to move those settings actions to my service and make sure it doesn't run multiple instances of my service. Is there a safe way to do that? If I make a service running flag somewhere if Kodi crashes it will probably end up in a bad state. I know we can see running services in the system settings but can't find how to retrieve them. At any rate, how will Kodi know the difference between the same script running as a service or running as a script? RE: Multiple extension points - pkscout - 2019-10-27 (2019-10-27, 13:54)Snapcase Wrote: Thanks RonieArtist Slideshow uses a window property as a flag to tell if it's running. If Kodi crashes this automatically gets wiped out. But if AS crashes it can leave you in a state where AS thinks it's already running, so you have to restart Kodi. @ronie probably knows more about that than I do. It's his original code. '-) RE: Multiple extension points - Snapcase - 2019-10-28 Thanks! Sounds like the window property flags are pretty useful |