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

    kodi.UpdateVideo()

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

    kodi.CleanVideo()
    kodi.UpdateVideo()
    return build_alexa_response('Cleaning and updating video library')
Esempio n. 3
0
def alexa_update_video(slots):
    card_title = 'Updating video library'
    print card_title
    sys.stdout.flush()

    kodi.UpdateVideo()

    answer = "Updating video library"
    return build_alexa_response(answer, card_title)
Esempio n. 4
0
def alexa_clean_video(slots):
    print('Cleaning video library')
    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()

    return build_alexa_response('Cleaning and updating video library')