xbmc hanging on using Player().play() for a youtube playlist
#1
I am trying to use xbmc Player to play a playlist where playlist items invoke youtube plugin.

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.
Reply
#2
The entire log please
Reply
#3
here is complete log pasted on pastebin
http://pastebin.com/i3MtDp2t

there is no log afterwards and xbmc is not responding.

my plugin is plugin.video.videoplaylist, youtube has already been installed.
Reply
#4
I'd clearly classify this as an XBMC specific bug.

I would try with Eden and see if it still happens.
Reply
#5
Thumbs Up 
Thanks a lot, worked fine in Eden beta.
Reply
#6
I am facing the same problem

here is debug log file.
http://pastebin.com/JpQ975aJ


Please let me what I am doing wrong.

My addon py code
Quote: if section == 'videos':
links = url.split(':;')
for videoLink in links:
if videoLink== "": continue
print "URL:"+videoLink
liz = xbmcgui.ListItem("playlistitem", iconImage="DefaultFolder.png")
liz.setProperty('IsPlayable', 'true')
playlist.add(url=videoLink, listitem=liz)
xbmc.Player().play(item=playlist)


Quick update Video link in the above code is
Video Link :plugin://plugin.video.youtube/?action=play_video&videoid=Xtf0iYh99pM


Reply

Logout Mark Read Team Forum Stats Members Help
xbmc hanging on using Player().play() for a youtube playlist0