Media Brazil Forum

Full Version: Criar TV indoor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Boa noite!
Dúvida de novato! Quero criar uma TV indoor, que alterne entre clima, playlist de imagens e playlist de video.
Com a ajuda do amigo Wanilton (http://www.xbmcbrasil.net/thread-2595.html), fiz algumas alterações que deram certo, mas colocar o video para aparecer não dá certo de jeito nenhum!
Abaixo o código que funciona bem:

Code:
import xbmc
import kodi

monitor = xbmc.Monitor()

def wait(wait_time):
    current_time = 0
    while current_time <= wait_time:
        if not monitor.abortRequested():
            xbmc.sleep(100)
            current_time += 100
        else:
            break
    return

def slide():
    aborted_requested = monitor.abortRequested()
    if not aborted_requested:
        wait(35000)    
        xbmc.executebuiltin('XBMC.ActivateWindow(weather)')
    if not aborted_requested:
        wait(15000)
        xbmc.executebuiltin('xbmc.RecursiveSlideShow("/storage/Torrents/Image/",isdir)')
    if not aborted_requested: return True
    else: return False
    
if __name__ == '__main__':
    while not monitor.abortRequested():
        abort = slide()
        if not abort: break
Quando acrescento as linhas (abaixo do "xbmc.executebuiltin('xbmc.RecursiveSlideShow"), o script para de funcionar:
Code:
if not aborted_requested:
        wait(15000)
        xbmc.executebuiltin('xbmc.PlayMedia("/storage/Torrents/Watch/",isdir)')

Já tentei com ' ', "", sem o isdir e com o arquivo m3u, mas nada!

Obrigado a quem puder me ajudar!