Python script stopped
#1
I'm trying to run the ppstream addon (from the Chinese addon repository).

I'm getting a strange problem with Python stopping unexpectedly.

I've traced it to this section of the Python script:

PHP Code:
if link.find('<iframe src="http://kan.pps.tv/play_list_v5_')==-1:
    
li=xbmcgui.ListItem("当前视频:"+name)
    
u=sys.argv[0]+"?mode=40&name="+urllib.quote_plus(name)
    
xbmcplugin.addDirectoryItem(int(sys.argv[1]),u,li)  
        
match=re.compile("plist\[(.+?)\]\='(.+?)\|\|\|(.+?)\|\|\|(.+?)';").findall(link)
        for 
i in range(0,len(match)):
            
li=xbmcgui.ListItem(str(i+1)+"."+match[i][1].decode("gbk").encode("utf8"))
            
u=sys.argv[0]+"?mode=23&name="+urllib.quote_plus(name)+"&url="+urllib.quote_plus(match[i][2])
            
xbmcplugin.addDirectoryItem(int(sys.argv[1]),u,li)
else: 

And here is the corresponding section of the debug log:

17:21:42 T:5684 M:2212663296 DEBUG: XBPyThread:Tonguerocess - Entering source directory C:\Users\Bryan\AppData\Roaming\XBMC\addons\plugin.video.ppstream
17:21:43 T:3076 M:2211700736 DEBUG: ------ Window Init (DialogBusy.xml) ------
17:21:44 T:1396 M:2211962880 INFO: Loading skin file: DialogProgress.xml
17:21:44 T:1396 M:2211958784 DEBUG: ------ Window Init (DialogProgress.xml) ------
17:21:44 T:3076 M:2211958784 DEBUG: ------ Window Deinit (DialogBusy.xml) ------
17:21:46 T:1396 M:2209947648 DEBUG: XFILE::CPluginDirectory::WaitOnScriptResult- plugin returned successfully
17:21:46 T:5684 M:2209947648 INFO: Scriptresult: Success
17:21:46 T:3076 M:2209947648 DEBUG: Saving fileitems [plugin://plugin.video.ppstream/?mode=15&name=%E4%BA%BA%E5%9C%A8%E6%B1%9F%E6%B9%96&url=http%3A%2F%2Fkan.pps.tv%2Fplay%2F263867_2414710.html]
17:21:46 T:5684 M:2209947648 INFO: Python script stopped

17:21:46 T:5684 M:2209947648 DEBUG: Thread 5684 terminating

It appears that XBMC correctly added the directory item (the 'addDirectoryItem' near the bottom of the code snippet), but then it terminates and when I select that item nothing happens other than a select sound effect.

Does anyone have any idea why?
Reply
#2
see xbmcplugin.endOfDirectory(…Wink
Reply

Logout Mark Read Team Forum Stats Members Help
Python script stopped0