# -*- coding: cp1252 -*- # Main Module by: Blazetamer and TheHighway import urllib,urllib2,re,xbmcplugin,xbmcgui,sys,xbmc,os,xbmcaddon try: from addon.common.addon import Addon except: try: from t0mm0.common.addon import Addon except: from t0mm0_common_addon import Addon try: from addon.common.net import Net except: try: from t0mm0.common.net import Net except: from t0mm0_common_net import Net #Define common.addon addon_id='plugin.video.phwizard'; AddonTitle='Config Wizard'; # Global Stuff addon=Addon(addon_id,sys.argv); net=Net(); settings=xbmcaddon.Addon(id=addon_id); net.set_user_agent('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'); AddonIcon=settings.getAddonInfo('icon') AddonFanart=settings.getAddonInfo('fanart') AddonPath=settings.getAddonInfo('path') # # def get_params(): param=[] paramstring=sys.argv[2] if len(paramstring)>=2: params=sys.argv[2]; cleanedparams=params.replace('?','') if (params[len(params)-1]=='/'): params=params[0:len(params)-2] pairsofparams=cleanedparams.split('&'); param={} for i in range(len(pairsofparams)): splitparams={}; splitparams=pairsofparams[i].split('=') if (len(splitparams))==2: param[splitparams[0]]=splitparams[1] return param
try: from addon.common.net import Net except: try: from t0mm0.common.net import Net except: from t0mm0_common_net import Net #Define common.addon addon_id = 'plugin.video.hubwizard' AddonTitle = 'Config Wizard' # Global Stuff addon = Addon(addon_id, sys.argv) net = Net() settings = xbmcaddon.Addon(id=addon_id) net.set_user_agent( 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ) AddonIcon = settings.getAddonInfo('icon') AddonFanart = settings.getAddonInfo('fanart') AddonPath = settings.getAddonInfo('path') # # def get_params(): param = [] paramstring = sys.argv[2] if len(paramstring) >= 2: params = sys.argv[2] cleanedparams = params.replace('?', '') if (params[len(params) - 1] == '/'): params = params[0:len(params) - 2] pairsofparams = cleanedparams.split('&')
from addon.common.addon import Addon except: from t0mm0.common.addon import Addon addon_id = 'plugin.video.twomovies' addon = main.addon try: from addon.common.net import Net except: from t0mm0.common.net import Net net = Net(http_debug=True) newagent ='Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36' net.set_user_agent(newagent) base_url = 'http://www.twomovies.name' #PATHS artwork = xbmc.translatePath(os.path.join('http://rowthreemedia.com/xbmchub/2movies/art/', '')) settings = xbmcaddon.Addon(id='plugin.video.twomovies') addon_path = os.path.join(xbmc.translatePath('special://home/addons'), '') #========================DLStuff======================= mode = addon.queries['mode'] url = addon.queries.get('url', '') name = addon.queries.get('name', '') thumb = addon.queries.get('thumb', '') ext = addon.queries.get('ext', '')
##Run Add-On Pack Installer import urllib,urllib2,re,xbmcplugin,xbmcgui,xbmc,xbmcaddon,os,sys,downloader,extract,time,shutil,subprocess from resources.modules import main addon_id='script.pack.installer'; AddonTitle='Add-on Pack Installer'; wizardUrl='https://raw.githubusercontent.com/Josh5/addon-packs/master/'; #wizardUrl='http://tribeca.xbmchub.com/tools/wizard/' SiteDomain='TinyHTPC.co.nz'; #SiteDomain='XBMCHUB.com' TeamName='Add-on Pack Installer'; #TeamName='Team XBMCHUB' try: from addon.common.addon import Addon except: try: from t0mm0.common.addon import Addon except: from t0mm0_common_addon import Addon try: from addon.common.net import Net except: try: from t0mm0.common.net import Net except: from t0mm0_common_net import Net addon=main.addon; net=Net(); settings=xbmcaddon.Addon(id=addon_id); net.set_user_agent('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'); #==========================Help WIZARD===================================================================================================== def HELPCATEGORIES(): if ((XBMCversion['Ver'] in ['','']) or (int(XBMCversion['two']) < 12)) and (settings.getSetting('bypass-xbmcversion')=='false'): eod(); addon.show_ok_dialog(["Compatibility Issue: Outdated Kodi Setup","Please upgrade to a newer version of XBMC first!","Visit %s for Support!"%SiteDomain],title="XBMC "+XBMCversion['Ver'],is_error=False); DoA('Back'); else: link=OPEN_URL(wizardUrl+'packs.txt').replace('\n','').replace('\r','') match=re.compile('name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?escription="(.+?)".+?ype="(.+?)".+?nset="(.+?)".+?estart="(.+?)"').findall(link) for name,url,iconimage,fanart,description,filetype,skinset,restart in match: #if 'status' in filetype: #main.addHELPDir(name,url,'wizardstatus',iconimage,fanart,description,filetype) #else: main.addHELPDir(name,url,'helpwizard',iconimage,fanart,description,filetype,skinset,restart) #print [name,url] main.AUTO_VIEW('movies') #main.addHELPDir('Testing','http://www.firedrive.com/file/################','helpwizard',iconimage,fanart,description,filetype) ## For Testing to test a url with a FileHost.