Python script stopped

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
18000rpm Offline
Junior Member
Posts: 46
Joined: Dec 2009
Reputation: 0
Post: #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::Process - 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?
(This post was last modified: 2011-01-27 09:06 by 18000rpm.)
find quote
ppic Offline
Skilled Python Coder
Posts: 2,664
Joined: Feb 2009
Reputation: 10
Location: France idf
Post: #2
see xbmcplugin.endOfDirectory(…Wink

[Image: widget]
Passion-XBMC Repository Download your SVN skins and addons
TvTunes Addon Download Play your theme while browsing library
TVshow Next Aired display next aired infos from tvrage.com
Logo Downloader Script download Logo/clearart/show thumbs/poster/banner
Bande-Annonce Allociné plugin watch trailers in french and vo
SportLive Script Live score match info in XBMC (not compatible dharma)
find quote