Advertisement
Guest User

Cavazorro - XBMC proof of concept & debugging

a guest
May 10th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. import urllib,urllib2,re,xbmcplugin,xbmcgui
  2. import simplejson
  3. from xml.dom import minidom
  4. import subprocess
  5. import xbmcaddon
  6.  
  7. def get_params():
  8. param=[]
  9. paramstring=sys.argv[2]
  10. if len(paramstring)>=2:
  11. params=sys.argv[2]
  12. cleanedparams=params.replace('?','')
  13. if (params[len(params)-1]=='/'):
  14. params=params[0:len(params)-2]
  15. pairsofparams=cleanedparams.split('&')
  16. param={}
  17. for i in range(len(pairsofparams)):
  18. splitparams={}
  19. splitparams=pairsofparams[i].split('=')
  20. if (len(splitparams))==2:
  21. param[splitparams[0]]=splitparams[1]
  22.  
  23. return param
  24.  
  25. liz=xbmcgui.ListItem("Link", "", "")
  26. liz.setInfo( type="Pictures", infoLabels={ "Title":"David"} )
  27. xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url="C:\\1_616140.jpg",listitem=liz,isFolder=False)
  28. xbmcplugin.endOfDirectory(int(sys.argv[1]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement