2011-12-30, 13:58
I am trying to use xbmc Player to play a playlist where playlist items invoke youtube plugin.
if i play single item then it works fine
also playlist.playoffset works fine, but when i try to use xbmc.Player().play(item=playlist) to play playlist, xbmc hangs. Here is debug log
I want to capture onPlaybackStarted and onPlaybackEnded for each playlist item, so planning to use xbmc.Player() to play playlist.
Any help will be appreciated.
Code:
video_id = 'dummy_video'
title = 'dummy title'
description = 'dummy plot'
url = "plugin://plugin.video.youtube/?action=play_video&videoid=%s" %video_id
listitem=xbmcgui.ListItem(title, thumbnailImage=thumb)
listitem.setInfo( type="video", infoLabels={ "Title": title, "Plot" : description } )
playlist.add(url=url, listitem=listitem)
#xbmc.Player().play(item=url, listitem=listitem) #works fine for single item
if playlist.size() > 0:
#xbmc.executebuiltin('playlist.playoffset(video , 0)') #works fine
xbmc.Player().play(item=playlist) #fails, xbmc hangs
if i play single item then it works fine
Code:
xbmc.Player().play(item=url, listitem=listitem)
also playlist.playoffset works fine, but when i try to use xbmc.Player().play(item=playlist) to play playlist, xbmc hangs. Here is debug log
Quote:16:57:49 DEBUG: ------ Window Init (DialogProgress.xml) ------
16:57:49 DEBUG: new file set audiostream:0
16:57:49 DEBUG: StartScript - calling plugin YouTube('plugin://plugin.video.youtube/','1','?action=play_video&videoid=WhPky-k63oM')
16:57:49 INFO: initializing python engine.
16:57:49 DEBUG: new python thread created. id=2
16:57:49 DEBUG: WaitOnScriptResult - waiting on the YouTube plugin...
16:57:49 DEBUG: Python thread: start processing
I want to capture onPlaybackStarted and onPlaybackEnded for each playlist item, so planning to use xbmc.Player() to play playlist.
Any help will be appreciated.