first version that really plays anything :-)

This commit is contained in:
Ronald Schaten 2021-03-17 00:12:33 +01:00
parent 9f40ff2c96
commit 9ca445d772

View File

@ -162,3 +162,21 @@ if __name__ == '__main__':
print('=== playlist') print('=== playlist')
for entry in program: for entry in program:
print(" * [%s] -- %s" % (entry['type'], entry['data'])) print(" * [%s] -- %s" % (entry['type'], entry['data']))
if xbmc.getCondVisibility('Window.IsVisible(MovieInformation)'):
xbmc.executebuiltin('Dialog.Close(MovieInformation)')
print('=== playing')
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
playlist.clear()
for entry in program:
print(" * [%s] -- %s" % (entry['type'], entry['data']))
if entry['type'] == 'video':
playlist.add(entry['data'])
else:
print(" unable to handle %s yet" % entry['type'])
xbmc.Player().play(playlist)
xbmc.sleep(500)
while xbmc.getCondVisibility('Player.HasMedia'):
xbmc.sleep(100)
print('=== done playing')