Esempio n. 1
0
def alexa_update_audio(slots):
    print('Updating audio library')
    sys.stdout.flush()

    kodi.UpdateMusic()

    return build_alexa_response('Updating audio library')
Esempio n. 2
0
def alexa_clean_audio(slots):
    print('Cleaning audio library')
    sys.stdout.flush()

    kodi.CleanMusic()
    kodi.UpdateMusic()
    return build_alexa_response('Cleaning and updating audio library')
Esempio n. 3
0
def alexa_update_audio(slots):
    card_title = 'Updating audio library'
    print card_title
    sys.stdout.flush()

    kodi.UpdateMusic()

    answer = "Updating audio library"
    return build_alexa_response(answer, card_title)
Esempio n. 4
0
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')