first version that really plays anything :-)
This commit is contained in:
parent
9f40ff2c96
commit
9ca445d772
18
addon.py
18
addon.py
@ -162,3 +162,21 @@ if __name__ == '__main__':
|
||||
print('=== playlist')
|
||||
for entry in program:
|
||||
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')
|
||||
|
Loading…
Reference in New Issue
Block a user