def alexa_go_home(slots): card_title = 'Navigate: Home' print card_title sys.stdout.flush() kodi.Home() answer = "" return build_alexa_response(answer, card_title)
def alexa_clean_audio(slots): print('Cleaning audio library') sys.stdout.flush() kodi.UpdateMusic() #Use threading to solve the call from returing too late c = threading.Thread(target=kodi.CleanMusic) c.daemon = True c.start() #Calling this because for some reason it won't fire until the next command happens? kodi.Home() return build_alexa_response('Cleaning and updating audio library')
def alexa_clean_video(slots): card_title = 'Cleaning video library' print card_title sys.stdout.flush() kodi.UpdateVideo() # Use threading to solve the call from returing too late c = threading.Thread(target=kodi.CleanVideo) c.daemon = True c.start() # Calling this because for some reason it won't fire until the next command happens? kodi.Home() answer = "Cleaning video library" return build_alexa_response(answer, card_title)
def alexa_do_search(slots): card_title = 'Search' heard_search = '' if 'value' in slots['Movie']: heard_search = str(slots['Movie']['value']).lower().translate(None, string.punctuation) elif 'value' in slots['Show']: heard_search = str(slots['Show']['value']).lower().translate(None, string.punctuation) elif 'value' in slots['Artist']: heard_search = str(slots['Artist']['value']).lower().translate(None, string.punctuation) if (len(heard_search) > 0): answer = 'Searching for %s' % (heard_search) kodi.Home() kodi.CallKodiSearch(heard_search) return build_alexa_response(answer, card_title) else: return build_alexa_response("Couldn't find anything matching that phrase", card_title)
def alexa_go_home(slots): print('Returning to home') sys.stdout.flush() kodi.Home() return build_alexa_response('Going home')
def alexa_go_home(slots): kodi.Home() return build_alexa_response('Going home')