def COMMUNITY():

	link = Common.OPEN_URL(Community_List).replace('\n','').replace('\r','')
	match = re.compile('name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)"').findall(link)
	for name,url,iconimage,fanart in match:
		Common.addDir("[COLOR cyan]" + name + " [/COLOR]",url,93,iconimage,fanart,'')
	
	Common.addItem('[COLOR white]HOW TO ADD YOUR BUILDS TO THE LIST![/COLOR]',BASEURL,17,ICON,FANART,'')
Exemple #2
0
def ADVANCEDSETTINGS():

        link = Common.OPEN_URL(AdvancedSettings).replace('\n','').replace('\r','')
        match = re.compile('name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?ersion="(.+?)"').findall(link)
        if os.path.isfile(ADVANCED_SET_FILE):
                Common.addItem('[COLOR white]Remove Current Advanced Settings Configuration[/COLOR]',BASEURL,53,ART+'asettings.png',FANART,'')
        for name,url,iconimage,fanart,description in match:
                Common.addItem(name,url,54,ART+'asettings.png',FANART,description)
def COMMUNITY():

	link = Common.OPEN_URL(Community_List).replace('\n','').replace('\r','')
	match = re.compile('name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)"').findall(link)
	for name,url,iconimage,fanart in match:
		Common.addDir("[COLOR cyan]" + name + " [/COLOR]",url,93,iconimage,fanart,'')
	
	Common.addItem('[COLOR white]HOW TO ADD YOUR BUILDS TO THE LIST![/COLOR]',BASEURL,17,ICON,FANART,'')
def SPEEDTEST():

    link = Common.OPEN_URL(SpeedTest).replace('\n', '').replace('\r', '')
    match = re.compile(
        'name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?ersion="(.+?)"'
    ).findall(link)
    for name, url, iconimage, fanart, description in match:
        Common.addItem(
            '[COLOR cyan]' + name + " | " + description + '[/COLOR]', url, 15,
            ICON, ART + 'speedfanart.jpg', '')
def DARTS_LISTINGS():

	url = base64.b64decode(b'aHR0cDovL3d3dy5za3lzcG9ydHMuY29tL2RhcnRzL3NjaGVkdWxl')
	r = common.OPEN_URL_NORMAL(url).replace('\r','').replace('\n','').replace('\t','')
	match = re.compile('<div class="score-sub" style="width:56px">        (.+?)    </div>    <div class="score-comp">(.+?)</div>        <div class="score-side" style="width:360px">        (.+?)                    </div>        <ul class="score-sublinks">                        <li class="score-tv"><img src=".+?" title="(.+?)"></li>').findall(r)
	for date,location,type,channel in match:
		if not '&nbsp;' in location:
			common.addItem('[COLOR white]'+date+' [COLOR white]taking place at '+location+'[/COLOR]','','',icon,fanart,'')
		else:	
			common.addItem('[COLOR white]'+date+'[/COLOR][COLOR white] - No location found[/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR skyblue]'+type+'[/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR yellow] '+channel+'[/COLOR]','','',icon,fanart,'')
		common.addItem('------------------------------------------','','',icon,fanart,'')
Exemple #6
0
def ADVANCEDSETTINGS():

    link = Common.OPEN_URL(AdvancedSettings).replace('\n',
                                                     '').replace('\r', '')
    match = re.compile(
        'name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?ersion="(.+?)"'
    ).findall(link)
    if os.path.isfile(ADVANCED_SET_FILE):
        Common.addItem(
            '[COLOR white]Remove Current Advanced Settings Configuration[/COLOR]',
            BASEURL, 53, ART + 'asettings.png', FANART, '')
    for name, url, iconimage, fanart, description in match:
        Common.addItem(name, url, 54, ART + 'asettings.png', FANART,
                       description)
Exemple #7
0
def maintMenu():

	Common.addDir('[COLOR cyan]Auto Clean Device[/COLOR]','url',31,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Clear Cache[/COLOR]','url',1,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Delete Thumbnails[/COLOR]','url',2,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Purge Packages[/COLOR]','url',3,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Convert Physical Paths To Special[/COLOR]','url',13,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addDir('[COLOR cyan]SYSTEM RESET [/COLOR][COLOR red](CAUTION)[/COLOR]','url',6,ICON,FANART,'')
def maintMenu():

	Common.addDir('[COLOR cyan]Auto Clean Device[/COLOR]','url',31,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Clear Cache[/COLOR]','url',1,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Delete Thumbnails[/COLOR]','url',2,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Purge Packages[/COLOR]','url',3,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Convert Physical Paths To Special[/COLOR]','url',13,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addDir('[COLOR cyan]SYSTEM RESET [/COLOR][COLOR red](CAUTION)[/COLOR]','url',6,ICON,FANART,'')
def NHL_LISTINGS():

	THE_DATE = time.strftime("%Y%m%d") # todays date

	now = datetime.now()
	diff = timedelta(days=7)
	future = now + diff
	Oneweek = future.strftime("%Y%m%d") # date in a week
	url = base64.b64decode(b'aHR0cDovL3d3dy53aGVyZXN0aGVtYXRjaC5jb20vdHYvaG9tZS5hc3A/c2hvd2RhdGVzdGFydD0lcyZzaG93ZGF0ZWVuZD0lcyZzcG9ydGlkPTE5')%(THE_DATE,Oneweek)
	r = common.OPEN_URL_NORMAL(url).replace('\r','').replace('\n','').replace('\t','')
	match = re.compile('<span class="fixture">                        <a class="" href=".+?">                            <em class="">(.+?)</em> <em class="">v</em> <em class="">(.+?)</em> <em class="livestream">Live Stream</em></a></span>                    <span class="ground "><span                         class="time-channel ">(.+?)</span></span>.+?<td class="competition-name">                    <img title=".+?" src=".+?" alt=".+?" />                                        <span class="">(.+?)</span> <span class="stage ">').findall(r)
	common.addItem('[COLOR white]Check out the Live NHL Section for all games[/COLOR]','','',icon,fanart,'')
	common.addItem('------------------------------------------','','',icon,fanart,'')
	for away,home,channel,competition in match:
		common.addItem('[COLOR white]'+away+' vs '+home+'[/COLOR] [COLOR skyblue]in the '+competition+'[/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR yellow]'+channel+'[/COLOR]','','',icon,fanart,'')
		common.addItem('------------------------------------------','','',icon,fanart,'')
def MLB_LISTINGS():

	THE_DATE = time.strftime("%Y%m%d") # todays date

	now = datetime.now()
	diff = timedelta(days=7)
	future = now + diff
	Oneweek = future.strftime("%Y%m%d") # date in a week
	url = base64.b64decode(b'aHR0cDovL3d3dy53aGVyZXN0aGVtYXRjaC5jb20vdHYvaG9tZS5hc3A/c2hvd2RhdGVzdGFydD0lcyZzaG93ZGF0ZWVuZD0lcyZzcG9ydGlkPTg=')%(THE_DATE,Oneweek)
	r = common.OPEN_URL_NORMAL(url).replace('\r','').replace('\n','').replace('\t','')
	match = re.compile('<span class="fixture">                        <a class="" href=".+?">                            <em class="">(.+?)</em> <em class="">v</em> <em class="">(.+?)</em> <em class="livestream">Live Stream</em></a></span>                    <span class="ground "><span                         class="time-channel ">(.+?)</span></span>').findall(r)
	common.addItem('[COLOR white]Check out the Live MLB Section for all games[/COLOR]','','',icon,fanart,'')
	common.addItem('------------------------------------------','','',icon,fanart,'')
	for team1,team2,channel in match:
		common.addItem('[COLOR white]'+team1+' vs '+team2+'[/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR yellow]'+channel+'[/COLOR]','','',icon,fanart,'')
		common.addItem('------------------------------------------','','',icon,fanart,'')
def Motorsport_LISTINGS():

	THE_DATE = time.strftime("%Y%m%d") # todays date

	now = datetime.now()
	diff = timedelta(days=7)
	future = now + diff
	Oneweek = future.strftime("%Y%m%d") # date in a week
	url = base64.b64decode(b'aHR0cDovL3d3dy53aGVyZXN0aGVtYXRjaC5jb20vdHYvaG9tZS5hc3A/c2hvd2RhdGVzdGFydD0lcyZzaG93ZGF0ZWVuZD0lcyZzcG9ydGlkPTIw')%(THE_DATE,Oneweek)
	r = common.OPEN_URL_NORMAL(url).replace('\r','').replace('\n','').replace('\t','')
	match = re.compile('<span class="fixture"><a class=".+?eventlink" href=".+?"><strong class=".+?>(.+?)</strong></a></span>                    <em class=".+?>(.+?)</em>                    <span class="ground.+?><span                         class="time-channel.+?>(.+?)</span></span>.+?<td class="competition-name">                    <img title=".+?" src=".+?" alt=".+?" />                                        <span class=".+?>(.+?)</span>').findall(r)
	for title,event,when,competition in match:
		common.addItem('[COLOR white]'+title+'[/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR white]'+event+'[/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR yellow]'+when+'[/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR skyblue]'+competition+'[/COLOR]','','',icon,fanart,'')
		common.addItem('------------------------------------------','','',icon,fanart,'')
Exemple #12
0
def maintMenu(params):

    CACHE = xbmc.translatePath(os.path.join('special://home/cache', ''))
    PACKAGES = xbmc.translatePath(
        os.path.join('special://home/addons', 'packages'))
    THUMBS = xbmc.translatePath(
        os.path.join('special://home/userdata', 'Thumbnails'))

    if not os.path.exists(CACHE):
        CACHE = xbmc.translatePath(os.path.join('special://home/temp', ''))
    if not os.path.exists(PACKAGES):
        os.makedirs(PACKAGES)

    CACHE_SIZE_BYTE = get_size(CACHE)
    PACKAGES_SIZE_BYTE = get_size(PACKAGES)
    THUMB_SIZE_BYTE = get_size(THUMBS)

    CACHE_SIZE = convertSize(CACHE_SIZE_BYTE)
    PACKAGES_SIZE = convertSize(PACKAGES_SIZE_BYTE)
    THUMB_SIZE = convertSize(THUMB_SIZE_BYTE)

    startup_clean = plugintools.get_setting("acstartup")
    weekly_clean = plugintools.get_setting("clearday")

    if startup_clean == "false":
        startup_onoff = "[COLOR red]OFF[/COLOR]"
    else:
        startup_onoff = "[COLOR lime]ON[/COLOR]"
    if weekly_clean == "0":
        weekly_onoff = "[COLOR red]OFF[/COLOR]"
    else:
        weekly_onoff = "[COLOR lime]ON[/COLOR]"

    common.addItem('[COLOR white][B]Auto Clean Device[/B][/COLOR]', 'url', 19,
                   ICON, FANART, '')
    common.addItem(
        "[COLOR white][B]Clear Cache[/B][/COLOR] - Current Size: " +
        str(CACHE_SIZE), BASEURL, 20, ICON, FANART, '')
    common.addItem(
        "[COLOR white][B]Delete Thumbnails [/B][/COLOR] - Current Size: " +
        str(THUMB_SIZE), BASEURL, 22, ICON, FANART, '')
    common.addItem(
        "[COLOR white][B]Purge Packages [/B][/COLOR] - Current Size: " +
        str(PACKAGES_SIZE), BASEURL, 23, ICON, FANART, '')
    common.addItem('[COLOR white][B]Update Addons & Repos[/B][/COLOR]',
                   BASEURL, 26, ICON, FANART, '')
Exemple #13
0
def IP_TOOLS():
    Common.addItem(
        "[COLOR green][B]-------------------------------------------------[/B][/COLOR]",
        'url', 79, ICON, FANART, '')
    Common.addItem('[COLOR yellow] IP Checker[/COLOR]', 'fanart', 14, ICON,
                   FANART, '')
    Common.addItem('[COLOR yellow] Speed Test[/COLOR]', 'fanart', 15, ICON,
                   FANART, '')
    Common.addItem(
        "[COLOR green][B]-------------------------------------------------[/B][/COLOR]",
        'url', 79, ICON, FANART, '')
def BUILDMENU():

    Jarvis = 0
    Krypton = 0
    Beta = 0
    updownj = "[B][COLOR lime]ONLINE[/B][/COLOR]"
    updownk = "[B][COLOR lime]ONLINE[/B][/COLOR]"
    updownb = "[B][COLOR lime]ONLINE[/B][/COLOR]"
    dialog = xbmcgui.Dialog()

    try:
        response = urllib2.urlopen(JarvisWiz)
    except:
        Jarvis = 1

    try:
        response = urllib2.urlopen(KryptonWiz)
    except:
        Krypton = 1

    try:
        response = urllib2.urlopen(BetaWiz)
    except:
        Beta = 1

    if Jarvis == 1:
        updownj = "[B][COLOR red]OFFLINE[/B][/COLOR]"

    if Krypton == 1:
        updownk = "[B][COLOR red]OFFLINE[/B][/COLOR]"

    if Beta == 1:
        updownb = "[B][COLOR red]OFFLINE[/B][/COLOR]"

    Common.addDir(updownj + ' - [COLOR cyan]JARVIS BUILDS[/COLOR]', BASEURL,
                  19, ART + 'SKYLEX XXL.png', ART + 'SKYLEX XXL.png', '')
    Common.addDir(updownk + ' - [COLOR cyan]KRYPTON BUILDS[/COLOR]', BASEURL,
                  20, ART + 'SONAR.png', ART + 'SONAR.png', '')
    Common.addDir(updownb + ' - [COLOR cyan]BETA BUILDS[/COLOR]', BASEURL, 21,
                  ART + 'EMBER.png', ART + 'EMBER.png', '')
    Common.addItem('[COLOR powderblue]Which should I choose?[/COLOR]', BASEURL,
                   44, ICON, FANART, '')
Exemple #15
0
def BACKUPMENU():

        Common.addItem('Backup','url',31,ART+'backuprestore.png',FANART,'')
        Common.addDir('Restore','url',32,ART+'backuprestore.png',FANART,'')
        Common.addDir('Delete A Backup','url',33,ART+'backuprestore.png',FANART,'')
        Common.addItem('Delete All Backups','url',34,ART+'backuprestore.png',FANART,'')
        Common.addItem('Select Backup Location','url',29,ART+'backuprestore.png',FANART,'')
Exemple #16
0
def BACKUPMENU():

    Common.addItem('[COLOR cyan]Backup[/COLOR]','url',70,ICON,FANART,'')
    Common.addDir('[COLOR cyan]Restore[/COLOR]','url',71,ICON,FANART,'')
    Common.addDir('[COLOR cyan]Delete A Backup[/COLOR]','url',72,ICON,FANART,'')
    Common.addItem('[COLOR cyan]Delete All Backups[/COLOR]','url',73,ICON,FANART,'')
    Common.addItem('[COLOR cyan]Select Backup Location[/COLOR]','url',9,ICON,FANART,'')
def BACKUPMENU():

    Common.addItem('[COLOR cyan]Backup[/COLOR]','url',70,ICON,FANART,'')
    Common.addDir('[COLOR cyan]Restore[/COLOR]','url',71,ICON,FANART,'')
    Common.addDir('[COLOR cyan]Delete A Backup[/COLOR]','url',72,ICON,FANART,'')
    Common.addItem('[COLOR cyan]Delete All Backups[/COLOR]','url',73,ICON,FANART,'')
    Common.addItem('[COLOR cyan]Select Backup Location[/COLOR]','url',9,ICON,FANART,'')
def BUILDMENU():
 
	Jarvis = 0
	Krypton = 0
	Beta = 0
	updownj = "[B][COLOR lime]ONLINE[/B][/COLOR]"
	updownk = "[B][COLOR lime]ONLINE[/B][/COLOR]"
	updownb = "[B][COLOR lime]ONLINE[/B][/COLOR]"
	dialog = xbmcgui.Dialog()
	
	try:
	    response = urllib2.urlopen(JarvisWiz)
	except:
	    Jarvis = 1

	try:
	    response = urllib2.urlopen(KryptonWiz)
	except:
	    Krypton = 1
		
	try:
	    response = urllib2.urlopen(BetaWiz)
	except:
	    Beta = 1

	if Jarvis == 1:
		updownj = "[B][COLOR red]OFFLINE[/B][/COLOR]"
	
	if Krypton == 1:
		updownk = "[B][COLOR red]OFFLINE[/B][/COLOR]"

	if Beta == 1:
		updownb = "[B][COLOR red]OFFLINE[/B][/COLOR]"

	Common.addDir(updownj + ' - [COLOR cyan]JARVIS BUILDS[/COLOR]',BASEURL,19,ART+'SKYLEX XXL.png',ART+'SKYLEX XXL.png','')
	Common.addDir(updownk + ' - [COLOR cyan]KRYPTON BUILDS[/COLOR]',BASEURL,20,ART+'SONAR.png',ART+'SONAR.png','')
	Common.addDir(updownb + ' - [COLOR cyan]BETA BUILDS[/COLOR]',BASEURL,21,ART+'EMBER.png',ART+'EMBER.png','')
	Common.addItem('[COLOR powderblue]Which should I choose?[/COLOR]',BASEURL,44,ICON,FANART,'')
Exemple #19
0
def BACKUPMENU():

    Common.addItem('Backup', 'url', 31, ART + 'backuprestore.png', FANART, '')
    Common.addDir('Restore', 'url', 32, ART + 'backuprestore.png', FANART, '')
    Common.addDir('Delete A Backup', 'url', 33, ART + 'backuprestore.png',
                  FANART, '')
    Common.addItem('Delete All Backups', 'url', 34, ART + 'backuprestore.png',
                   FANART, '')
    Common.addItem('Select Backup Location', 'url', 29,
                   ART + 'backuprestore.png', FANART, '')
def Wrestling_LISTINGS():

	THE_DATE = time.strftime("%Y%m%d") # todays date

	now = datetime.now()
	diff = timedelta(days=7)
	future = now + diff
	Oneweek = future.strftime("%Y%m%d") # date in a week
	url = base64.b64decode(b'aHR0cDovL3d3dy53aGVyZXN0aGVtYXRjaC5jb20vdHYvaG9tZS5hc3A/c2hvd2RhdGVzdGFydD0lcyZzaG93ZGF0ZWVuZD0lcyZzcG9ydGlkPTM1')%(THE_DATE,Oneweek)
	r = common.OPEN_URL_NORMAL(url).replace('\r','').replace('\n','').replace('\t','')
	match = re.compile('<td class="fixture-details">                    <span class="fixture"><a class=" eventlink" href=".+?"><strong class="">.+?</strong></a></span>                    <em class="">(.+?)</em>                    <span class="ground "><span                         class="time-channel ">(.+?)</span></span>').findall(r)
	for when,event in match:
		common.addItem('[COLOR white]'+when+'[/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR yellow]'+event+'[/COLOR]','','',icon,fanart,'')
		common.addItem('------------------------------------------','','',icon,fanart,'')
def HorseRacing_LISTINGS():

	THE_DATE = time.strftime("%Y%m%d") # todays date

	now = datetime.now()
	diff = timedelta(days=7)
	future = now + diff
	Oneweek = future.strftime("%Y%m%d") # date in a week
	url = base64.b64decode(b'aHR0cDovL3d3dy53aGVyZXN0aGVtYXRjaC5jb20vdHYvaG9tZS5hc3A/c2hvd2RhdGVzdGFydD0lcyZzaG93ZGF0ZWVuZD0lcyZzcG9ydGlkPTI1')%(THE_DATE,Oneweek)
	r = common.OPEN_URL_NORMAL(url).replace('\r','').replace('\n','').replace('\t','')
	match = re.compile('<a class=" eventlink" href=".+?"><strong class="">.+?</strong></a></span>                    <em class="">(.+?)</em>                    <span class="ground "><span                         class="time-channel ">(.+?)</span></span>.+?</td>                <td class="away-team"></td>                                    <td class="start-details">                                                    <span>.+?</span><span class="time "><em class="">.+?</em></span>.+?<td class="competition-name">                    <img title=".+?" src=".+?" alt=".+?" />                                        <span class="">(.+?)</span>').findall(r)
	for event,when,type in match:
		a,b = event.split("Live Racing from ")
		common.addItem('[COLOR white]'+type+' at[/COLOR] [COLOR skyblue]'+b+'[/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR yellow]'+when+'[/COLOR]','','',icon,fanart,'')
		common.addItem('------------------------------------------','','',icon,fanart,'')
Exemple #22
0
def INDEX():

  #if plugintools.get_setting("username")=="":
  #       settings(params)
		 
  #login_request =  login(LoginServer  , plugintools.get_setting("username") , plugintools.get_setting("password") )

  #if login_request!="ACCESS GRANTED":	
	Common.addItem('[COLOR cyan]SERVER STATUS [/COLOR]' + CommunityStatus + JarvisWizStatus + JarvisUpdateStatus + KryptonWizStatus + KryptonUpdateStatus + SpeedTestStatus,BASEURL,92,ICON,FANART,'')
	Common.addDir('[COLOR cyan]PROJECT X WIZARD BUILDS[/COLOR] - [COLOR powderblue]J v16[/COLOR] | ' + JarvisWizStatusMain + ' - [COLOR powderblue]K v17[/COLOR] | ' + KryptonWizStatusMain,BASEURL,88,ICON,FANART,'')
	Common.addItem('[COLOR cyan]CHECK FOR UPDATES[/COLOR] - [COLOR powderblue]J v16[/COLOR] | ' + JarvisUpdateStatusMain + ' - [COLOR powderblue]K v17[/COLOR] | ' + KryptonUpdateStatusMain,BASEURL,11,ICON,FANART,'')
	Common.addDir('[COLOR cyan]COMMUNITY BUILDS[/COLOR] - ' + CommunityStatusMain,BASEURL,87,ICON,FANART,'')
	Common.addDir('[COLOR cyan]ADVANCED SETTINGS[/COLOR] - ' + AdvancedSettingsMain,BASEURL,30,ICON,FANART,'')
	Common.addDir('[COLOR cyan]SPEED TEST[/COLOR] - ' + SpeedTestStatusMain,BASEURL,16,ICON,ART+'speedfanart.jpg','')
	Common.addDir('[COLOR cyan]MAINTENANCE TOOLS[/COLOR]',BASEURL,5,ICON,ART+'maintwall.jpg','')
	Common.addDir('[COLOR cyan]BACKUP [COLOR powderblue]|[/COLOR] RESTORE[/COLOR]',BASEURL,8,ICON,FANART,'')
	Common.addDir('[COLOR cyan]INFORMATION[/COLOR]',BASEURL,4,ICON,FANART,'')
	Common.addItem('[COLOR cyan]SETTINGS[/COLOR]',BASEURL,9,ICON,FANART,'')
def ACCOUNT():

  f = urllib.urlopen("http://www.canyouseeme.org/")
  html_doc = f.read()
  f.close()
  m = re.search('(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)',html_doc)
  s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  s.connect(("8.8.8.8", 80))
  user = plugintools.get_setting("username")

  key = base64.b64encode(plugintools.get_setting("beta"))
	
  if key=="d2F0ZXJtZWxsb24=":
    beta = "[COLOR lime]Yes[/COLOR]"
  else:
    beta = "[COLOR red]No[/COLOR]"
	
  if check=="true":
    a = "[COLOR lime]Yes[/COLOR]"
  else:
    a = "[COLOR red]No[/COLOR]"
	
  if auto=="true":
    b = "[COLOR lime]Yes[/COLOR]"
  else:
    b = "[COLOR red]No[/COLOR]"

  Common.addItem('[COLOR cyan]Version: [/COLOR][COLOR lime]%s' % version + " " + codename + "[/COLOR]",BASEURL,200,ICON,FANART,'')
  Common.addItem('[COLOR cyan]BETA Tester: [/COLOR]' + beta,BASEURL,200,ICON,FANART,'')
  Common.addItem('[COLOR cyan]Check For Updates: [/COLOR]' + a,BASEURL,200,ICON,FANART,'')
  Common.addItem('[COLOR cyan]Auto Updates: [/COLOR]' + b,BASEURL,200,ICON,FANART,'')
  Common.addItem('[COLOR cyan]Local IP: [/COLOR][COLOR yellow]' + s.getsockname()[0] + '[/COLOR]',BASEURL,200,ICON,FANART,'')
  Common.addItem('[COLOR cyan]External IP: [/COLOR][COLOR yellow]' + m.group(0) + '[/COLOR]',BASEURL,200,ICON,FANART,'')
Exemple #24
0
def Restore():

    for file in os.listdir(USB):
        if file.endswith(".zip"):
            url =  xbmc.translatePath(os.path.join(USB,file))
            Common.addItem(file,url,100,ICON,ICON,'')
def ACCOUNT():

    f = urllib.urlopen("http://www.canyouseeme.org/")
    html_doc = f.read()
    f.close()
    m = re.search(
        '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)',
        html_doc)
    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    s.connect(("8.8.8.8", 80))
    user = plugintools.get_setting("username")

    key = base64.b64encode(plugintools.get_setting("beta"))

    if key == "tvsupertuga=":
        beta = "[COLOR lime]Yes[/COLOR]"
    else:
        beta = "[COLOR red]No[/COLOR]"

    if check == "true":
        a = "[COLOR lime]Yes[/COLOR]"
    else:
        a = "[COLOR red]No[/COLOR]"

    if auto == "true":
        b = "[COLOR lime]Yes[/COLOR]"
    else:
        b = "[COLOR red]No[/COLOR]"

    Common.addItem(
        '[COLOR cyan]Version: [/COLOR][COLOR lime]%s' % version + " " +
        codename + "[/COLOR]", BASEURL, 200, ICON, FANART, '')
    Common.addItem('[COLOR cyan]BETA Tester: [/COLOR]' + beta, BASEURL, 200,
                   ICON, FANART, '')
    Common.addItem('[COLOR cyan]Check For Updates: [/COLOR]' + a, BASEURL, 200,
                   ICON, FANART, '')
    Common.addItem('[COLOR cyan]Auto Updates: [/COLOR]' + b, BASEURL, 200,
                   ICON, FANART, '')
    Common.addItem(
        '[COLOR cyan]Local IP: [/COLOR][COLOR yellow]' + s.getsockname()[0] +
        '[/COLOR]', BASEURL, 200, ICON, FANART, '')
    Common.addItem(
        '[COLOR cyan]External IP: [/COLOR][COLOR yellow]' + m.group(0) +
        '[/COLOR]', BASEURL, 200, ICON, FANART, '')
def RugbyUnion_LISTINGS():

	THE_DATE = time.strftime("%Y%m%d") # todays date

	now = datetime.now()
	diff = timedelta(days=7)
	future = now + diff
	Oneweek = future.strftime("%Y%m%d") # date in a week

	url = base64.b64decode(b'aHR0cDovL3d3dy53aGVyZXN0aGVtYXRjaC5jb20vdHYvaG9tZS5hc3A/c2hvd2RhdGVzdGFydD0lcyZzaG93ZGF0ZWVuZD0lcyZzcG9ydGlkPTM=')%(THE_DATE,Oneweek)
	r = common.OPEN_URL_NORMAL(url).replace('\r','').replace('\n','').replace('\t','')
	match = re.compile('<span class="fixture">                        <a class="" href=".+?">                            <em class="">(.+?)</em> <em class="">v</em> <em class="">(.+?)</em> <em class="livestream">Live Stream</em></a></span>                    <span class="ground "><span                         class="time-channel ">(.+?)</span></span>.+?<span class="">(.+?)</span> .+?<span class="stage ').findall(r)
	for team1,team2,when,type in match:
		if 'Live Stream' in when:
			a,b = when.split("on")
			common.addItem('[COLOR white]'+team1+' vs '+team2+'[/COLOR] [COLOR skyblue]in the '+type+'[/COLOR]','','',icon,fanart,'')
			common.addItem('[COLOR yellow]'+a+'[/COLOR][COLOR white] - Not televised in the UK[/COLOR]','','',icon,fanart,'')
			common.addItem('------------------------------------------','','',icon,fanart,'')
		else:
			common.addItem('[COLOR white]'+team1+' vs '+team2+'[/COLOR] [COLOR skyblue]in the '+type+'[/COLOR]','','',icon,fanart,'')
			common.addItem('[COLOR yellow]'+when+'[/COLOR]','','',icon,fanart,'')
			common.addItem('------------------------------------------','','',icon,fanart,'')
Exemple #27
0
def maintMenu():

        HOME          =  xbmc.translatePath('special://home/')
        PACKAGES      =  xbmc.translatePath(os.path.join('special://home/addons','packages'))
        THUMBS        =  xbmc.translatePath(os.path.join('special://home/userdata','Thumbnails'))
        CACHE_FOLDER  =  xbmc.translatePath(os.path.join('special://home','cache'))
        TEMP_FOLDER   =  xbmc.translatePath(os.path.join('special://','temp'))
        CACHE         =  "NULL"

        if os.path.exists(CACHE_FOLDER):
                CACHE = CACHE_FOLDER

        if os.path.exists(TEMP_FOLDER):
                CACHE = TEMP_FOLDER

        if not os.path.exists(PACKAGES):
                os.makedirs(PACKAGES)

        if CACHE == "NULL":
                try:
                        PACKAGES_SIZE_BYTE = get_size(PACKAGES)
                        THUMB_SIZE_BYTE    = get_size(THUMBS)
                except: pass
        else:
                try:
                        CACHE_SIZE_BYTE    = get_size(CACHE)
                        PACKAGES_SIZE_BYTE = get_size(PACKAGES)
                        THUMB_SIZE_BYTE    = get_size(THUMBS)
                except: pass

        if CACHE == "NULL":
                try:
                        PACKAGES_SIZE = convertSize(PACKAGES_SIZE_BYTE)
                        THUMB_SIZE    = convertSize(THUMB_SIZE_BYTE)
                except: pass
        else:
                try:
                        CACHE_SIZE    = convertSize(CACHE_SIZE_BYTE)
                        PACKAGES_SIZE = convertSize(PACKAGES_SIZE_BYTE)
                        THUMB_SIZE    = convertSize(THUMB_SIZE_BYTE)
                except: pass

        if CACHE == "NULL":
                CACHE_SIZE    =  "[COLOR red][B]ERROR READING CACHE[/B][/COLOR]"

        startup_clean = plugintools.get_setting("acstartup")
        weekly_clean = plugintools.get_setting("clearday")
        sizecheck_clean = plugintools.get_setting("startupsize")

        if startup_clean == "false":
                startup_onoff = "[COLOR red][B]OFF[/COLOR][/B]"
        else:
                startup_onoff = "[COLOR lime][B]ON[/COLOR][/B]"
        if weekly_clean == "0":
                weekly_onoff = "[COLOR red][B]OFF[/COLOR][/B]"
        else:
                weekly_onoff = "[COLOR lime][B]ON[/COLOR][/B]"
        if sizecheck_clean == "false":
                sizecheck_onoff = "[COLOR red][B]OFF[/COLOR][/B]"
        else:
                sizecheck_onoff = "[COLOR lime][B]ON[/COLOR][/B]"


        Common.addItem('[COLOR dodgerblue]Auto Clean On Startup - [/COLOR]' + startup_onoff,BASEURL,110,ART+'system.png',FANART,'')
        Common.addItem('[COLOR dodgerblue]Weekly Auto Clean - [/COLOR]' + weekly_onoff,BASEURL,111,ART+'system.png',FANART,'')
        Common.addItem('[COLOR dodgerblue]Auto Clear At Specific MB - [/COLOR]' + sizecheck_onoff,BASEURL,29,ART+'system.png',FANART,'')
        Common.addItem("[COLOR powderblue][B]--------------------------[/B][/COLOR]",BASEURL,'',ICON,FANART,'')
        Common.addItem("[COLOR white]CACHE SIZE: [/COLOR]" + str(CACHE_SIZE),BASEURL,'',ICON,FANART,'')
        Common.addItem("[COLOR white]PACKAGES SIZE: [/COLOR]" + str(PACKAGES_SIZE),BASEURL,'',ICON,FANART,'')
        Common.addItem("[COLOR white]THUMBNAIL SIZE: [/COLOR]" + str(THUMB_SIZE),BASEURL,'',ICON,FANART,'')
        Common.addItem("[COLOR powderblue][B]--------------------------[/B][/COLOR]",BASEURL,'',ICON,FANART,'')        
        Common.addItem('[COLOR white]Auto Clean Device[/COLOR]','url',21,ART+'clean.png',FANART,'')
        Common.addItem('[COLOR white]Clear Cache[/COLOR]','url',22,ART+'clean.png',FANART,'')
        Common.addItem('[COLOR white]Delete Thumbnails[/COLOR]','url',23,ART+'clean.png',FANART,'')
        Common.addItem('[COLOR white]Purge Packages[/COLOR]','url',24,ART+'clean.png',FANART,'')
def SPEEDTEST():
    
    link = Common.OPEN_URL(SpeedTest).replace('\n','').replace('\r','')
    match = re.compile('name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?ersion="(.+?)"').findall(link)
    for name,url,iconimage,fanart,description in match:
        Common.addItem('[COLOR cyan]' + name + " | " + description + '[/COLOR]',url,15,ICON,ART+'speedfanart.jpg','')
Exemple #29
0
def tools():

        cachePath = os.path.join(xbmc.translatePath('special://home'), 'cache')
        tempPath = os.path.join(xbmc.translatePath('special://home'), 'temp')
        WindowsCache = xbmc.translatePath('special://home')
        i = 0

        if os.path.exists(tempPath):
                for root, dirs, files in os.walk(tempPath,topdown=True):
                        dirs[:] = [d for d in dirs]
                        for name in files:
                                if ".old.log" not in name.lower():
                                        if ".log" in name.lower():
                                                a=open((os.path.join(root, name))).read()       
                                                b=a.replace('\n','NEW_L').replace('\r','NEW_R')
                                                match = re.compile('EXCEPTION Thrown(.+?)End of Python script error report').findall(b)
                                                for checker in match:
                                                        i = i + 1

        if os.path.exists(WindowsCache):
                for root, dirs, files in os.walk(WindowsCache,topdown=True):
                        dirs[:] = [d for d in dirs]
                        for name in files:
                                if ".old.log" not in name.lower():
                                        if ".log" in name.lower():
                                                a=open((os.path.join(root, name))).read()       
                                                b=a.replace('\n','NEW_L').replace('\r','NEW_R')
                                                match = re.compile('EXCEPTION Thrown(.+?)End of Python script error report').findall(b)
                                                for checker in match:
                                                        i = i + 1

        if i == 0:
                ERRORS_IN_LOG = "[COLOR lime][B]0 ERRORS FOUND IN LOG[/B][/COLOR]"
        else:
                ERRORS_IN_LOG = "[COLOR red][B]" + str(i) + " ERRORS FOUND IN LOG[/B][/COLOR]"


        Common.addItem('Convert Physical Paths To Special','url',41,ART+'convert.png',FANART,'')
        Common.addItem('Check For Updates',BASEURL,42,ART+'update.png',FANART,'')
        Common.addItem('View Current or Old Log File','url',46,ART+'log.png',FANART,'')
        Common.addItem('View The Last Error In Log File','url',48,ART+'log.png',FANART,'')
        Common.addItem('View All ' + str(i) + ' Errors In Log File','url',49,ART+'log.png',FANART,'')
        Common.addItem('Delete Crash Logs','url',47,ART+'log.png',FANART,'')
        Common.addItem('Check for Broken Repositories','url',50,ART+'tool.png',FANART,'')
        Common.addItem('Check for Broken Sources in sources.xml','url',51,ART+'tool.png',FANART,'')
        Common.addDir('Advanced Settings',BASEURL,52,ART+'asettings.png',FANART,'')
        Common.addDir('Speed Test',BASEURL,43,ART+'speed.png',FANART,'')
        Common.addDir('System Reset [COLOR red](CAUTION)[/COLOR]','url',44,ART+'systemreset.png',FANART,'')
Exemple #30
0
def RESTORE_RD_TRAKT():

    for file in os.listdir(USB):
        if file.endswith("RD_Trakt_Settings.zip"):
            url =  xbmc.translatePath(os.path.join(USB,file))
            Common.addItem(file,url,105,ICON,ICON,'')
def UFC_LISTINGS():

	url = base64.b64decode(b'aHR0cDovL20udWsudWZjLmNvbS9zY2hlZHVsZQ==')
	r = common.OPEN_URL_NORMAL(url).replace('\r','').replace('\n','').replace('\t','')
	match = re.compile('<li class="touch-row-bg" data-event_id=".+?"><a href=".+?" title="Fight Card"><h5 class="upper ufc-red">(.+?)</h5><strong>(.+?)</strong><br />(.+?)<br />(.+?)</a></li>').findall(r)
	common.addItem('[COLOR white]Use Fight Pass for Prelims & BT Sport for matches[/COLOR]','','',icon,fanart,'')
	common.addItem('------------------------------------------','','',icon,fanart,'')
	for channel,event,date,location in match:
		common.addItem('[COLOR skyblue]'+event+'[/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR white]Location: '+location+'[/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR yellow]'+date+' '+channel+'[/COLOR]','','',icon,fanart,'')
		common.addItem('------------------------------------------','','',icon,fanart,'')
Exemple #32
0
def maintMenu():

    HOME = xbmc.translatePath('special://home/')
    PACKAGES = xbmc.translatePath(
        os.path.join('special://home/addons', 'packages'))
    THUMBS = xbmc.translatePath(
        os.path.join('special://home/userdata', 'Thumbnails'))
    CACHE_FOLDER = xbmc.translatePath(os.path.join('special://home', 'cache'))
    TEMP_FOLDER = xbmc.translatePath(os.path.join('special://', 'temp'))
    CACHE = "NULL"

    if os.path.exists(CACHE_FOLDER):
        CACHE = CACHE_FOLDER

    if os.path.exists(TEMP_FOLDER):
        CACHE = TEMP_FOLDER

    if not os.path.exists(PACKAGES):
        os.makedirs(PACKAGES)

    if CACHE == "NULL":
        try:
            PACKAGES_SIZE_BYTE = get_size(PACKAGES)
            THUMB_SIZE_BYTE = get_size(THUMBS)
        except:
            pass
    else:
        try:
            CACHE_SIZE_BYTE = get_size(CACHE)
            PACKAGES_SIZE_BYTE = get_size(PACKAGES)
            THUMB_SIZE_BYTE = get_size(THUMBS)
        except:
            pass

    if CACHE == "NULL":
        try:
            PACKAGES_SIZE = convertSize(PACKAGES_SIZE_BYTE)
            THUMB_SIZE = convertSize(THUMB_SIZE_BYTE)
        except:
            pass
    else:
        try:
            CACHE_SIZE = convertSize(CACHE_SIZE_BYTE)
            PACKAGES_SIZE = convertSize(PACKAGES_SIZE_BYTE)
            THUMB_SIZE = convertSize(THUMB_SIZE_BYTE)
        except:
            pass

    if CACHE == "NULL":
        CACHE_SIZE = "[COLOR red][B]ERROR READING CACHE[/B][/COLOR]"

    startup_clean = plugintools.get_setting("acstartup")
    weekly_clean = plugintools.get_setting("clearday")
    sizecheck_clean = plugintools.get_setting("startupsize")

    if startup_clean == "false":
        startup_onoff = "[COLOR red][B]OFF[/COLOR][/B]"
    else:
        startup_onoff = "[COLOR lime][B]ON[/COLOR][/B]"
    if weekly_clean == "0":
        weekly_onoff = "[COLOR red][B]OFF[/COLOR][/B]"
    else:
        weekly_onoff = "[COLOR lime][B]ON[/COLOR][/B]"
    if sizecheck_clean == "false":
        sizecheck_onoff = "[COLOR red][B]OFF[/COLOR][/B]"
    else:
        sizecheck_onoff = "[COLOR lime][B]ON[/COLOR][/B]"

    Common.addItem(
        '[COLOR dodgerblue]Auto Clean On Startup - [/COLOR]' + startup_onoff,
        BASEURL, 110, ART + 'system.png', FANART, '')
    Common.addItem(
        '[COLOR dodgerblue]Weekly Auto Clean - [/COLOR]' + weekly_onoff,
        BASEURL, 111, ART + 'system.png', FANART, '')
    Common.addItem(
        '[COLOR dodgerblue]Auto Clear At Specific MB - [/COLOR]' +
        sizecheck_onoff, BASEURL, 29, ART + 'system.png', FANART, '')
    Common.addItem(
        "[COLOR powderblue][B]--------------------------[/B][/COLOR]", BASEURL,
        '', ICON, FANART, '')
    Common.addItem("[COLOR white]CACHE SIZE: [/COLOR]" + str(CACHE_SIZE),
                   BASEURL, '', ICON, FANART, '')
    Common.addItem("[COLOR white]PACKAGES SIZE: [/COLOR]" + str(PACKAGES_SIZE),
                   BASEURL, '', ICON, FANART, '')
    Common.addItem("[COLOR white]THUMBNAIL SIZE: [/COLOR]" + str(THUMB_SIZE),
                   BASEURL, '', ICON, FANART, '')
    Common.addItem(
        "[COLOR powderblue][B]--------------------------[/B][/COLOR]", BASEURL,
        '', ICON, FANART, '')
    Common.addItem('[COLOR white]Auto Clean Device[/COLOR]', 'url', 21,
                   ART + 'clean.png', FANART, '')
    Common.addItem('[COLOR white]Clear Cache[/COLOR]', 'url', 22,
                   ART + 'clean.png', FANART, '')
    Common.addItem('[COLOR white]Delete Thumbnails[/COLOR]', 'url', 23,
                   ART + 'clean.png', FANART, '')
    Common.addItem('[COLOR white]Purge Packages[/COLOR]', 'url', 24,
                   ART + 'clean.png', FANART, '')
Exemple #33
0
def tools():

    cachePath = os.path.join(xbmc.translatePath('special://home'), 'cache')
    tempPath = os.path.join(xbmc.translatePath('special://home'), 'temp')
    WindowsCache = xbmc.translatePath('special://home')
    i = 0

    if os.path.exists(tempPath):
        for root, dirs, files in os.walk(tempPath, topdown=True):
            dirs[:] = [d for d in dirs]
            for name in files:
                if ".old.log" not in name.lower():
                    if ".log" in name.lower():
                        a = open((os.path.join(root, name))).read()
                        b = a.replace('\n', 'NEW_L').replace('\r', 'NEW_R')
                        match = re.compile(
                            'EXCEPTION Thrown(.+?)End of Python script error report'
                        ).findall(b)
                        for checker in match:
                            i = i + 1

    if os.path.exists(WindowsCache):
        for root, dirs, files in os.walk(WindowsCache, topdown=True):
            dirs[:] = [d for d in dirs]
            for name in files:
                if ".old.log" not in name.lower():
                    if ".log" in name.lower():
                        a = open((os.path.join(root, name))).read()
                        b = a.replace('\n', 'NEW_L').replace('\r', 'NEW_R')
                        match = re.compile(
                            'EXCEPTION Thrown(.+?)End of Python script error report'
                        ).findall(b)
                        for checker in match:
                            i = i + 1

    if i == 0:
        ERRORS_IN_LOG = "[COLOR lime][B]0 ERRORS FOUND IN LOG[/B][/COLOR]"
    else:
        ERRORS_IN_LOG = "[COLOR red][B]" + str(
            i) + " ERRORS FOUND IN LOG[/B][/COLOR]"

    Common.addItem('Convert Physical Paths To Special', 'url', 41,
                   ART + 'convert.png', FANART, '')
    Common.addItem('Check For Updates', BASEURL, 42, ART + 'update.png',
                   FANART, '')
    Common.addItem('View Current or Old Log File', 'url', 46, ART + 'log.png',
                   FANART, '')
    Common.addItem('View The Last Error In Log File', 'url', 48,
                   ART + 'log.png', FANART, '')
    Common.addItem('View All ' + str(i) + ' Errors In Log File', 'url', 49,
                   ART + 'log.png', FANART, '')
    Common.addItem('Delete Crash Logs', 'url', 47, ART + 'log.png', FANART, '')
    Common.addItem('Check for Broken Repositories', 'url', 50,
                   ART + 'tool.png', FANART, '')
    Common.addItem('Check for Broken Sources in sources.xml', 'url', 51,
                   ART + 'tool.png', FANART, '')
    Common.addDir('Advanced Settings', BASEURL, 52, ART + 'asettings.png',
                  FANART, '')
    Common.addDir('Speed Test', BASEURL, 43, ART + 'speed.png', FANART, '')
    Common.addDir('System Reset [COLOR red](CAUTION)[/COLOR]', 'url', 44,
                  ART + 'systemreset.png', FANART, '')
def F1_LISTINGS():

	url = base64.b64decode(b'aHR0cDovL2ZhYmlwdHYuY29tL3Nwb3J0cy9mMS50eHQ=')
	r = common.OPEN_URL_NORMAL(url).replace('\r','').replace('\n','').replace('\t','')
	match = re.compile('<h2 class="f1-races__race-name">(.+?)</h2>.+?<p class="f1-races__race-date">(.+?)</p>.+?<td class="standing-table__cell">(.+?)</td>.+?<td class="standing-table__cell standing-table__cell--name">              (.+?)            </td>.+?<td class="standing-table__cell">(.+?)</td>.+?<td class="standing-table__cell">(.+?)</td>.+?<td class="standing-table__cell is-invisible">(.+?)</td>.+?<td class="standing-table__cell standing-table__cell--name">              (.+?)            </td>.+?<td class="standing-table__cell">(.+?)</td>.+?<td class="standing-table__cell">(.+?)</td>.+?<td class="standing-table__cell">(.+?)</td>.+?<td class="standing-table__cell standing-table__cell--name">              (.+?)            </td>.+?<td class="standing-table__cell">(.+?)</td>.+?<td class="standing-table__cell">(.+?)</td>.+?<td class="standing-table__cell is-invisible">(.+?)</td>.+?<td class="standing-table__cell standing-table__cell--name">              (.+?)            </td>.+?<td class="standing-table__cell">(.+?)</td>.+?<td class="standing-table__cell">(.+?)</td>.+?<td class="standing-table__cell">(.+?)</td>.+?<td class="standing-table__cell standing-table__cell--name">              (.+?)            </td>.+?<td class="standing-table__cell">(.+?)</td>.+?<td class="standing-table__cell">(.+?)</td>').findall(r)
	for location,daterange,date,eventtype,start,finish,date2,eventtype2,start2,finish2,date3,eventtype3,start3,finish3,date4,eventtype4,start4,finish4,date5,eventtype5,start5,finish5 in match:
		common.addItem('[COLOR white]'+location+' taking place '+daterange+'[/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR skyblue]'+date+'[/COLOR] - [COLOR white]'+eventtype+' - On Air: [COLOR skyblue]'+start+'[/COLOR] and Starts: [COLOR skyblue]'+finish+'[/COLOR][/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR skyblue]'+date2+'[/COLOR] - [COLOR white]'+eventtype2+' - On Air: [COLOR skyblue]'+start2+'[/COLOR] and Starts: [COLOR skyblue]'+finish2+'[/COLOR][/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR skyblue]'+date3+'[/COLOR] - [COLOR white]'+eventtype3+' - On Air: [COLOR skyblue]'+start3+'[/COLOR] and Starts: [COLOR skyblue]'+finish3+'[/COLOR][/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR skyblue]'+date4+'[/COLOR] - [COLOR white]'+eventtype4+' - On Air: [COLOR skyblue]'+start4+'[/COLOR] and Starts: [COLOR skyblue]'+finish4+'[/COLOR][/COLOR]','','',icon,fanart,'')
		common.addItem('[COLOR skyblue]'+date5+'[/COLOR] - [COLOR white]'+eventtype5+' - On Air: [COLOR skyblue]'+start5+'[/COLOR] and Starts: [COLOR skyblue]'+finish5+'[/COLOR][/COLOR]','','',icon,fanart,'')
		common.addItem('------------------------------------------','','',icon,fanart,'')
Exemple #35
0
def INDEX():
    cachePath = os.path.join(xbmc.translatePath('special://home'), 'cache')
    tempPath = os.path.join(xbmc.translatePath('special://home'), 'temp')
    WindowsCache = xbmc.translatePath('special://home')
    i = 0

    if os.path.exists(tempPath):
        for root, dirs, files in os.walk(tempPath, topdown=True):
            dirs[:] = [d for d in dirs]
            for name in files:
                if ".old.log" not in name.lower():
                    if ".log" in name.lower():
                        a = open((os.path.join(root, name))).read()
                        b = a.replace('\n', 'NEW_L').replace('\r', 'NEW_R')
                        match = re.compile(
                            'EXCEPTION Thrown(.+?)End of Python script error report'
                        ).findall(b)
                        for checker in match:
                            i = i + 1

    if os.path.exists(WindowsCache):
        for root, dirs, files in os.walk(WindowsCache, topdown=True):
            dirs[:] = [d for d in dirs]
            for name in files:
                if ".old.log" not in name.lower():
                    if ".log" in name.lower():
                        a = open((os.path.join(root, name))).read()
                        b = a.replace('\n', 'NEW_L').replace('\r', 'NEW_R')
                        match = re.compile(
                            'EXCEPTION Thrown(.+?)End of Python script error report'
                        ).findall(b)
                        for checker in match:
                            i = i + 1

    if i == 0:
        ERRORS_IN_LOG = "[COLOR blue]0 [COLOR yellow]Errors found in the log[/COLOR]"
    else:
        ERRORS_IN_LOG = "[COLOR red]" + str(
            i) + " [COLOR yellow]Errors found in the log[/COLOR]"
    HOME = xbmc.translatePath('special://home/')
    CACHE = xbmc.translatePath(os.path.join('special://home/cache', ''))
    PACKAGES = xbmc.translatePath(
        os.path.join('special://home/addons', 'packages'))
    THUMBS = xbmc.translatePath(
        os.path.join('special://home/userdata', 'Thumbnails'))

    if not os.path.exists(CACHE):
        CACHE = xbmc.translatePath(os.path.join('special://home/temp', ''))
    if not os.path.exists(PACKAGES):
        os.makedirs(PACKAGES)

    try:
        CACHE_SIZE_BYTE = get_size(CACHE)  #!f!T!G!#
        PACKAGES_SIZE_BYTE = get_size(PACKAGES)
        THUMB_SIZE_BYTE = get_size(THUMBS)
    except:
        pass

    try:
        CACHE_SIZE = convertSize(CACHE_SIZE_BYTE)
        PACKAGES_SIZE = convertSize(PACKAGES_SIZE_BYTE)
        THUMB_SIZE = convertSize(THUMB_SIZE_BYTE)
    except:
        pass
    Common.addItem(
        "[COLOR yellow][B]->             PSMC MAINTENANCE             <-[/B][/COLOR]",
        'url', 0, ICON, FANART, '')
    Common.addItem(
        "[COLOR green][B]---------------------------------------------[/B][/COLOR]",
        'url', 0, ICON, FANART, '')
    Common.addItem(
        "[COLOR green][B]                Select Option Below[CR]               (Showing Current Info)       [/B][/COLOR]",
        'url', 0, ICON, FANART, '')
    Common.addItem("[COLOR yellow]Cache Size = [/COLOR]" + str(CACHE_SIZE),
                   'url', 3, ICON, FANART, '')
    Common.addItem(
        "[COLOR yellow]Packages Size = [/COLOR]" + str(PACKAGES_SIZE), 'url',
        6, ICON, FANART, '')
    Common.addItem(
        "[COLOR yellow]Thumbnails Size = [/COLOR]" + str(THUMB_SIZE), 'url', 5,
        ICON, FANART, '')
    Common.addItem(
        "[COLOR green][B]-------------------------------------------------[/B][/COLOR]",
        'url', 0, ICON, FANART, '')
    Common.addDir('[COLOR yellow]Back-Up Options[/COLOR]', 'url', 11, ICON,
                  FANART, '')
    Common.addDir('[COLOR yellow]Internet Tools[/COLOR]', 'url', 13, ICON,
                  FANART, '')
    Common.addDir('[COLOR yellow]Open Addon Settings[/COLOR]', 'url', 1, ICON,
                  FANART, '')
    Common.addItem(
        "[COLOR green][B]-------------------------------------------------[/B][/COLOR]",
        'url', 0, ICON, FANART, '')
    Common.addItem('[COLOR yellow]View Current or Old Log File[/COLOR]', 'url',
                   8, ICON, FANART, '')
    Common.addItem(ERRORS_IN_LOG, 'url', 17, ICON, FANART, '')
    # Common.addItem('[COLOR yellow]Force Close Kodi[/COLOR]','url',10,ICON,FANART,'')
    Common.addItem(
        '[B][COLOR firebrick]* * Fresh Start * *[/B][/COLOR][CR][I]Please set skin back to Estuary first.[/I]',
        'url', 9, ICON, FANART, '')
    Common.addItem(
        "[COLOR green][B]-------------------------------------------------[/B][/COLOR]",
        'url', 0, ICON, FANART, '')
    Common.addItem('[COLOR yellow]Clear Cache[/COLOR]', 'url', 3, ICON, FANART,
                   '')
    Common.addItem('[COLOR yellow]Delete Crash Logs[/COLOR]', 'url', 4, ICON,
                   FANART, '')
    Common.addItem('[COLOR yellow]Delete Thumbnails[/COLOR]', 'url', 5, ICON,
                   FANART, '')
    Common.addItem('[COLOR yellow]Purge Packages[/COLOR]', 'url', 6, ICON,
                   FANART, '')
Exemple #36
0
def BackupMenu():
    if not os.path.exists(backupdir): os.makedirs(backupdir)
    ##needs work and modules added ####
    Common.addItem('[COLOR green][B]-----BACKUP OPTIONS-----[/B][/COLOR]',
                   'url', 79, ICON, FANART, '')
    Common.addItem('[COLOR yellow] Full Backup (Everything)[/COLOR]', 'url',
                   20, ICON, FANART, '')
    Common.addItem('[COLOR yellow] Backup Build ( No Thumbs or DBs)[/COLOR]',
                   'url', 21, ICON, FANART, '')
    Common.addItem('[COLOR yellow] Backup Favorites[/COLOR]', 'url', 18, ICON,
                   FANART, '')
    Common.addItem('[COLOR yellow] Backup Super Favorites[/COLOR]', 'url', 32,
                   ICON, FANART, '')
    Common.addItem('[COLOR yellow] Backup Addon Data[/COLOR]', 'url', 22, ICON,
                   FANART, '')
    Common.addItem('[COLOR yellow] Backup RD & Trakt Settings[/COLOR]', 'url',
                   23, ICON, FANART, '')
    Common.addItem('[COLOR yellow] Backup Ivue TV Guide settings[/COLOR]',
                   'url', 31, ICON, FANART, '')
    Common.addItem('[COLOR green][B]-----RESTORE OPTIONS-----[/B][/COLOR]',
                   'url', 79, ICON, FANART, '')
    Common.addDir('[COLOR yellow] Restore A Full Backup[/COLOR]', 'url', 24,
                  ICON, FANART, '')
    Common.addItem('[COLOR yellow] Restore Favorites[/COLOR]', 'url', 19, ICON,
                   FANART, '')
    Common.addDir('[COLOR yellow] Restore Super Favourites[/COLOR]', 'url', 24,
                  ICON, FANART, '')
    Common.addDir('[COLOR yellow] Restore Addon Data[/COLOR]', 'url', 24, ICON,
                  FANART, '')
    Common.addDir('[COLOR yellow] Restore Ivue TV Guide settings[/COLOR]',
                  'url', 24, ICON, FANART, '')
    Common.addDir('[COLOR yellow] Restore RD & Trakt Settings[/COLOR]', 'url',
                  25, ICON, FANART, '')
    Common.addItem('[COLOR green][B]-----OTHER OPTIONS-----[/B][/COLOR]',
                   'url', 79, ICON, FANART, '')
    Common.addDir('[COLOR yellow] Delete A Backup[/COLOR]', 'url', 26, ICON,
                  FANART, '')
    Common.addItem('[COLOR yellow] Delete All Backups[/COLOR]', 'url', 27,
                   ICON, FANART, '')
def Restore():
	addonfolder = xbmc.translatePath(os.path.join('special://','home'))
	for file in os.listdir(USB):
		if file.endswith(".zip"):
			url =  xbmc.translatePath(os.path.join(USB,file))
			Common.addItem(file,url,100,ICON,ICON,'')
Exemple #38
0
def Restore():
    addonfolder = xbmc.translatePath(os.path.join('special://', 'home'))
    for file in os.listdir(USB):
        if file.endswith(".zip"):
            url = xbmc.translatePath(os.path.join(USB, file))
            Common.addItem(file, url, 100, ICON, ICON, '')