Service addon specific documentation
#1
Hay!

I'm writing an addon to have some background music whenever a movie's not playing. Guessed I have to create a service addon so it auto-starts. Thing is, I'm having trouble with some basic things and it's hard to find service-specific help. For instance, not sure how to terminate the thread (Again I guessed I had to use threads), so I just hope it will end when I quit XBMC hehe, but when I go to "addons" and deactivate my addon, the music keeps playing.

It's probably something really simple, the basics of a service addon, so does anybody know if there are tutorials or some documentation for services?

Thanks heaps!

Seya!

Marco
Reply
#2
All I found was this, pretty incomplete hahaha!

http://wiki.xbmc.org/index.php?title=HOW...g_services
Reply
#3
(2013-04-19, 12:54)NaturalBornCamp Wrote: All I found was this, pretty incomplete hahaha!

http://wiki.xbmc.org/index.php?title=HOW...g_services

it's as complete as it has to be.
the rest is standard python
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#4
I agree it's a good start, but nowhere as complete as the regular scripts documentation unfortunately. After I finish my addon I will try to update the wiki with the best I will know, like how to detect if the script is already running, if you are using thread how to retrieve that thread to modify it, how to stop the service when video playback is started, how to restart it when video is stopped or paused, among other questions I could not find in the wiki.
Reply
#5
(2013-04-19, 14:16)NaturalBornCamp Wrote: I agree it's a good start, but nowhere as complete as the regular scripts documentation unfortunately. After I finish my addon I will try to update the wiki with the best I will know, like how to detect if the script is already running, if you are using thread how to retrieve that thread to modify it, how to stop the service when video playback is started, how to restart it when video is stopped or paused, among other questions I could not find in the wiki.

That is nothing service script specific.
With the service you start a normal script and that is it. Nothing special about it. The rest is just the same as any python script and you should just follow the " regular scripts documentation".

If you have any code examples put them there and not under service addon.
So here:
http://wiki.xbmc.org/index.php?title=Python_development

Still cleaning up because it was spread everywhere and that is not how it should be. Python is python and keeping a script alive is just the same for a service as for a regular addon.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#6
Great thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
Service addon specific documentation0