2022-04-02, 23:30
Hey everyone
I'm on my first Kodi service development and trying to figure out how I can catch that the user stopped or paused the playback (or when the tv show episode ended), to do some things once after every time something has been played?
This is my current structure:
I know that there are callback functions like onPlayBackStopped() and so on, but I have no clue on how to implement them in a service?
Thanks in advance for your help
I'm on my first Kodi service development and trying to figure out how I can catch that the user stopped or paused the playback (or when the tv show episode ended), to do some things once after every time something has been played?
This is my current structure:
python:
class Service():
def __init__(self, *args):
self.skipped = False
def ServiceEntryPoint(self):
monitor = xbmc.Monitor()
while not monitor.abortRequested():
if xbmc.Player().isPlaying():
#doing some things here, while playing a movie
if monitor.waitForAbort(5):
break
I know that there are callback functions like onPlayBackStopped() and so on, but I have no clue on how to implement them in a service?
Thanks in advance for your help