diff --git a/xbmc-wiimote b/xbmc-wiimote index b5d6e70..1ddc946 100755 --- a/xbmc-wiimote +++ b/xbmc-wiimote @@ -57,6 +57,13 @@ class TimerReset(Thread): self.finished.clear() ### end of included code +class Pinger(Thread): + def run(self): + global xbmc + while(True): + sleep(55) + xbmc.ping() + # Default settings PROGRAM = "XBMC Wiimote Gateway" ICON = "/usr/share/pixmaps/xbmc/bluetooth.png" @@ -170,6 +177,10 @@ def main(): xbmc = XBMCClient(PROGRAM, icon_file=ICON) xbmc.connect() + # Start the pinger thread to frequently let XBMC know we are still here. + ping = Pinger() + ping.start() + while(True): # The main loop. try: