Solved Starting/stopping service when skin changes
#1
My addon service is only useful when my skin is being used. Is there an effective way using xbmc.monitor or something else to start/stop the service when the skin is changed?
Reply
#2
my initial thought, assuming your service addon is using a while loop to keep it alive, would be to exit the while loop if the skin is not your skin
need to locate a setting that shows what skin is active
restarting the service without restarting kodi i think would actually be impossible though
Reply
#3
(2023-02-22, 17:19)jepsizofye Wrote: my initial thought, assuming your service addon is using a while loop to keep it alive, would be to exit the while loop if the skin is not your skin
need to locate a setting that shows what skin is active
restarting the service without restarting kodi i think would actually be impossible though
Thanks @jepsizofye  yeah that was where I was getting stuck. Perhaps I can put the code within the while loop in the conditional check on the skin but keep the while loop itself active.

it's easy enough getting the current skin directory : skindir = xbmc.getSkinDir()
Reply
#4
i think youre right on target there, inside your existing while loop

if not skindir=="myskin":
    break

(apologies for syntax its just an example)
Reply
#5
Thanks for the help thinking this throuhg @jepsizofye
Reply
#6
right on, happy to
Reply

Logout Mark Read Team Forum Stats Members Help
Starting/stopping service when skin changes0