Playlist of plugin:// URLs crashes kodi
#1
A simple plugin like this works:

PHP Code:
ADDON_HANDLE int(sys.argv[1])
PATH sys.argv[0][33:-1]
QUERY sys.argv[2][1:]  
  
if 
PATH=='playvideo':
    
xbmc.Player().play(QUERY)    
else:    
    
listItem xbmcgui.ListItem('My video title')        
    
xbmcplugin.addDirectoryItem(handle=ADDON_HANDLEurl='plugin://plugin.video.myplugin/playvideo/?http://vo.fod4.com/v/8712fdfb54/v640-q2.mp4'listitem=listItem)
    
xbmcplugin.endOfDirectory(ADDON_HANDLE


Now we try doing the same thing only using playlists:
PHP Code:
ADDON_HANDLE int(sys.argv[1])
PATH sys.argv[0][29:-1]
QUERY sys.argv[2][1:]  
  
if 
PATH=='playvideo':
    
xbmc.Player().play(QUERY)    
else:    
    
listItem xbmcgui.ListItem('My video title')  
    
playlist xbmc.PlayList(xbmc.PLAYLIST_VIDEO)    
    
playlist.clear()       
    
playlist.add(url 'plugin://plugin.video.myplugin/playvideo/?http://vo.fod4.com/v/8712fdfb54/v640-q2.mp4'listitem=listItem)
    
xbmc.Player().play(playlist

The video starts playing and Kodi freezes/crashes.
Any way to make this work?
Reply
#2
Debug Log and crashlogs wanted on pastebin.com. Also what version?
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#3
I have made a few more tests with this. My script was also using pydevd(pydev remote debugger), when I disable it Kodi doesn't freeze.

What happens now is this:
The first time I run my plugin I see a short "busy" notice, but nothing happens.
Then the 2nd time I run it, the video starts playing, but I get an error message saying: "One or more items failed to play. Check the log file for details". The moment I click "OK" the video stops playing, and Kodi goes back to video addons menu.

log after first run (nothing happens) : http://pastebin.com/6juuBgL3
log after 2nd run (video plays): http://pastebin.com/XAswpPcR
log after I click "OK": http://pastebin.com/tcLcNEiC

I am using Helix.
Reply

Logout Mark Read Team Forum Stats Members Help
Playlist of plugin:// URLs crashes kodi0