abeksis

ssdfsdf

Jan 26th, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. def CATEGORIES():
  2. dialog = xbmcgui.Dialog()
  3. choice = dialog.select('Choose Skin', ['Eminence HE 2 For Kids','Eminence HE 2 +18'],0)
  4. skin='NNN'
  5. if choice == 0:
  6. skin='Eminence HE 2 Kids'
  7. ShowBk(skin)
  8. elif choice == 1:
  9. skin='Eminence HE 2 +18'
  10. ShowBk(skin)
  11.  
  12. def OPEN_URL(url):
  13. req = urllib2.Request(url)
  14. req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
  15. response = urllib2.urlopen(req)
  16. link=response.read()
  17. response.close()
  18. return link
  19.  
  20.  
  21. def wizard(name,url,description):
  22. path = xbmc.translatePath(os.path.join('special://home/addons','packages'))
  23. dp = xbmcgui.DialogProgress()
  24. dp.create("Abeksis Wizard","Downloading ",'', 'Please Wait')
  25. lib=os.path.join(path, name+'.zip')
  26. try:
  27. os.remove(lib)
  28. except:
  29. pass
  30. downloader.download(url, lib, dp)
  31. addonfolder = xbmc.translatePath(os.path.join('special://','home'))
  32. time.sleep(2)
  33. dp.update(0,"", "Extracting Zip Please Wait")
  34. print '======================================='
  35. print addonfolder
  36. print '======================================='
  37. extract.all(lib,addonfolder,dp)
  38. dialog = xbmcgui.Dialog()
  39. dialog.ok("DOWNLOAD COMPLETE", 'Unfortunately the only way to get the new changes to stick is', 'to force close kodi. Click ok to force Kodi to close,', 'DO NOT use the quit/exit options in Kodi., If the Force close does not close for some reason please Restart Device or kill task manaully')
  40. killxbmc()
Add Comment
Please, Sign In to add comment