XBMC is now called KODI. master
authorAlexander Koenig <alex@lisas.de>
Fri, 2 Jan 2015 10:41:22 +0000 (10:41 +0000)
committerAlexander Koenig <alex@lisas.de>
Fri, 2 Jan 2015 10:41:22 +0000 (10:41 +0000)
vompilirc.py

index 085121d0da0b725efd9212d3bcf86f2739c2af91..fd467dddf2cec7bb7298af15d827804578188474 100755 (executable)
@@ -109,7 +109,7 @@ remote_map = {
        'KEY_RED': VOMP_RED,'KEY_GREEN': VOMP_GREEN,'KEY_YELLOW': VOMP_YELLOW,'KEY_BLUE': VOMP_BLUE
 }
 
-(VOMPILIRC_MODE_OFF, VOMPILIRC_MODE_VOMP, VOMPILIRC_MODE_XBMC) = (0, 1, 2)
+(VOMPILIRC_MODE_OFF, VOMPILIRC_MODE_VOMP, VOMPILIRC_MODE_KODI) = (0, 1, 2)
 
 mode = VOMPILIRC_MODE_OFF
 child_pipe = None
@@ -127,10 +127,10 @@ def set_mode(newmode):
        global mode
        if mode != newmode:
                if newmode == VOMPILIRC_MODE_OFF:
-                       # we switch from either xbmc or vomp to off
+                       # we switch from either kodi or vomp to off
                        led_off()
                elif mode == VOMPILIRC_MODE_OFF:
-                       # we switch from off to either xbmc or vomp
+                       # we switch from off to either kodi or vomp
                        led_on()
 
                mode = newmode
@@ -145,15 +145,15 @@ def start_vomp():
        set_mode(VOMPILIRC_MODE_VOMP)
        child_pipe = subprocess.Popen(['vompclient','-n'])
 
-def start_xbmc():
+def start_kodi():
        global mode
        global child_pipe
        
        if debug:
-               print 'Starting XBMC'
+               print 'Starting KODI'
        
-       set_mode(VOMPILIRC_MODE_XBMC)
-       child_pipe = subprocess.Popen(['/usr/lib/xbmc/xbmc.bin', '--standalone'])
+       set_mode(VOMPILIRC_MODE_KODI)
+       child_pipe = subprocess.Popen(['/usr/lib/kodi/kodi.bin', '--standalone'])
 
 
 def tv_power(off=False):
@@ -222,16 +222,16 @@ def process_lirc_event():
                        if code['repeat'] == 0:
                                if mode == VOMPILIRC_MODE_OFF:
                                        start_vomp()
-                               elif mode == VOMPILIRC_MODE_XBMC:
+                               elif mode == VOMPILIRC_MODE_KODI:
                                        stop_child(force_off=False)
                                        start_vomp()
                elif code['config'] == 'KEY_VIDEO':
                        if code['repeat'] == 0:
                                if mode == VOMPILIRC_MODE_OFF:
-                                       start_xbmc()
+                                       start_kodi()
                                elif mode == VOMPILIRC_MODE_VOMP:
                                        stop_child(force_off=False)
-                                       start_xbmc()
+                                       start_kodi()
                else:
                        sys.stderr.write('Unknown key: %s\n' % code['config'])