def setSubtitles():
logger.info("tvalacarta.platformcode.xbmctools setSubtitles")
import time
contador = 0
while xbmc.Player().isPlayingVideo()==False:
logger.info("tvalacarta.platformcode.xbmctools setSubtitles: Waiting 2 seconds for video to start before setting subtitles")
time.sleep(2)
contador = contador + 1
if contador>10:
break
subtitlefile = os.path.join( config.get_data_path(), 'subtitulo.srt' )
logger.info("tvalacarta.platformcode.xbmctools setting subtitle file %s" % subtitlefile)
xbmc.Player().setSubtitles(subtitlefile)
评论列表
文章目录