def checkSkin():
	wiz.log("[Build Check] Invalid Skin Check Start")
	DEFAULTSKIN   = wiz.getS('defaultskin')
	DEFAULTNAME   = wiz.getS('defaultskinname')
	DEFAULTIGNORE = wiz.getS('defaultskinignore')
	gotoskin = False
	if not DEFAULTSKIN == '':
		if os.path.exists(os.path.join(ADDONS, DEFAULTSKIN)):
			if DIALOG.yesno(ADDONTITLE, "[COLOR %s]It seems that the skin has been set back to [COLOR %s]%s[/COLOR]" % (COLOR2, COLOR1, SKIN[5:].title()), "Would you like to set the skin back to:[/COLOR]", '[COLOR %s]%s[/COLOR]' % (COLOR1, DEFAULTNAME)):
				gotoskin = DEFAULTSKIN
				gotoname = DEFAULTNAME
			else: wiz.log("Skin was not reset", xbmc.LOGNOTICE); wiz.setS('defaultskinignore', 'true'); gotoskin = False
		else: wiz.setS('defaultskin', ''); wiz.setS('defaultskinname', ''); DEFAULTSKIN = ''; DEFAULTNAME = ''
	if DEFAULTSKIN == '':
		skinname = []
		skinlist = []
		for folder in glob.glob(os.path.join(ADDONS, 'skin.*/')):
			xml = "%s/addon.xml" % folder
			if os.path.exists(xml):
				f  = open(xml,mode='r'); g = f.read().replace('\n','').replace('\r','').replace('\t',''); f.close();
				match  = wiz.parseDOM(g, 'addon', ret='id')
				match2 = wiz.parseDOM(g, 'addon', ret='name')
				wiz.log("%s: %s" % (folder, str(match[0])), xbmc.LOGNOTICE)
				if len(match) > 0: skinlist.append(str(match[0])); skinname.append(str(match2[0]))
				else: wiz.log("ID not found for %s" % folder, xbmc.LOGNOTICE)
			else: wiz.log("ID not found for %s" % folder, xbmc.LOGNOTICE)
		if len(skinlist) > 0:
			if len(skinlist) > 1:
				if DIALOG.yesno(ADDONTITLE, "[COLOR %s]It seems that the skin has been set back to [COLOR %s]%s[/COLOR]" % (COLOR2, COLOR1, SKIN[5:].title()), "Would you like to view a list of avaliable skins?[/COLOR]"):
					choice = DIALOG.select("Select skin to switch to!", skinname)
					if choice == -1: wiz.log("Skin was not reset", xbmc.LOGNOTICE); wiz.setS('defaultskinignore', 'true')
					else: 
						gotoskin = skinlist[choice]
						gotoname = skinname[choice]
				else: wiz.log("Skin was not reset", xbmc.LOGNOTICE); wiz.setS('defaultskinignore', 'true')
			else:
				if DIALOG.yesno(ADDONTITLE, "[COLOR %s]It seems that the skin has been set back to [COLOR %s]%s[/COLOR]" % (COLOR2, COLOR1, SKIN[5:].title()), "Would you like to set the skin back to:[/COLOR]", '[COLOR %s]%s[/COLOR]' % (COLOR1, skinname[0])):
					gotoskin = skinlist[0]
					gotoname = skinname[0]
				else: wiz.log("Skin was not reset", xbmc.LOGNOTICE); wiz.setS('defaultskinignore', 'true')
		else: wiz.log("No skins found in addons folder.", xbmc.LOGNOTICE); wiz.setS('defaultskinignore', 'true'); gotoskin = False
	if gotoskin:
		skinSwitch.swapSkins(gotoskin)
		x = 0
		xbmc.sleep(1000)
		while not xbmc.getCondVisibility("Window.isVisible(yesnodialog)") and x < 150:
			x += 1
			xbmc.sleep(200)

		if xbmc.getCondVisibility("Window.isVisible(yesnodialog)"):
			wiz.ebi('SendClick(11)')
			wiz.lookandFeelData('restore')
		else: wiz.LogNotify("[COLOR %s]%s[/COLOR]" % (COLOR1, ADDONTITLE),'[COLOR %s]Skin Swap Timed Out![/COLOR]' % COLOR2)
	wiz.log("[Build Check] Invalid Skin Check End", xbmc.LOGNOTICE)
Exemplo n.º 2
0
def checkSkin():
	wiz.log("[Build Check] Invalid Skin Check Start")
	DEFAULTSKIN   = wiz.getS('defaultskin')
	DEFAULTNAME   = wiz.getS('defaultskinname')
	DEFAULTIGNORE = wiz.getS('defaultskinignore')
	gotoskin = False
	if not DEFAULTSKIN == '':
		if os.path.exists(os.path.join(ADDONS, DEFAULTSKIN)):
			if DIALOG.yesno(ADDONTITLE, "[COLOR %s]It seems that the skin has been set back to [COLOR %s]%s[/COLOR]" % (COLOR2, COLOR1, SKIN[5:].title()), "Would you like to set the skin back to:[/COLOR]", '[COLOR %s]%s[/COLOR]' % (COLOR1, DEFAULTNAME)):
				gotoskin = DEFAULTSKIN
				gotoname = DEFAULTNAME
			else: wiz.log("Skin was not reset", xbmc.LOGNOTICE); wiz.setS('defaultskinignore', 'true'); gotoskin = False
		else: wiz.setS('defaultskin', ''); wiz.setS('defaultskinname', ''); DEFAULTSKIN = ''; DEFAULTNAME = ''
	if DEFAULTSKIN == '':
		skinname = []
		skinlist = []
		for folder in glob.glob(os.path.join(ADDONS, 'skin.*/')):
			xml = "%s/addon.xml" % folder
			if os.path.exists(xml):
				f  = open(xml,mode='r'); g = f.read().replace('\n','').replace('\r','').replace('\t',''); f.close();
				match  = wiz.parseDOM(g, 'addon', ret='id')
				match2 = wiz.parseDOM(g, 'addon', ret='name')
				wiz.log("%s: %s" % (folder, str(match[0])), xbmc.LOGNOTICE)
				if len(match) > 0: skinlist.append(str(match[0])); skinname.append(str(match2[0]))
				else: wiz.log("ID not found for %s" % folder, xbmc.LOGNOTICE)
			else: wiz.log("ID not found for %s" % folder, xbmc.LOGNOTICE)
		if len(skinlist) > 0:
			if len(skinlist) > 1:
				if DIALOG.yesno(ADDONTITLE, "[COLOR %s]It seems that the skin has been set back to [COLOR %s]%s[/COLOR]" % (COLOR2, COLOR1, SKIN[5:].title()), "Would you like to view a list of avaliable skins?[/COLOR]"):
					choice = DIALOG.select("Select skin to switch to!", skinname)
					if choice == -1: wiz.log("Skin was not reset", xbmc.LOGNOTICE); wiz.setS('defaultskinignore', 'true')
					else: 
						gotoskin = skinlist[choice]
						gotoname = skinname[choice]
				else: wiz.log("Skin was not reset", xbmc.LOGNOTICE); wiz.setS('defaultskinignore', 'true')
			else:
				if DIALOG.yesno(ADDONTITLE, "[COLOR %s]It seems that the skin has been set back to [COLOR %s]%s[/COLOR]" % (COLOR2, COLOR1, SKIN[5:].title()), "Would you like to set the skin back to:[/COLOR]", '[COLOR %s]%s[/COLOR]' % (COLOR1, skinname[0])):
					gotoskin = skinlist[0]
					gotoname = skinname[0]
				else: wiz.log("Skin was not reset", xbmc.LOGNOTICE); wiz.setS('defaultskinignore', 'true')
		else: wiz.log("No skins found in addons folder.", xbmc.LOGNOTICE); wiz.setS('defaultskinignore', 'true'); gotoskin = False
	if gotoskin:
		skinSwitch.swapSkins(gotoskin)
		x = 0
		xbmc.sleep(1000)
		while not xbmc.getCondVisibility("Window.isVisible(yesnodialog)") and x < 150:
			x += 1
			xbmc.sleep(200)

		if xbmc.getCondVisibility("Window.isVisible(yesnodialog)"):
			wiz.ebi('SendClick(11)')
			wiz.lookandFeelData('restore')
		else: wiz.LogNotify("[COLOR %s]%s[/COLOR]" % (COLOR1, ADDONTITLE),'[COLOR %s]Skin Swap Timed Out![/COLOR]' % COLOR2)
	wiz.log("[Build Check] Invalid Skin Check End", xbmc.LOGNOTICE)
Exemplo n.º 3
0
    elif SKIN in ['skin.confluence', 'skin.estuary']:
        wiz.log("[Installed Check] Incorrect skin: %s" % SKIN, xbmc.LOGNOTICE)
        defaults = wiz.getS('defaultskin')
        if not defaults == '':
            if os.path.exists(ADDONS, defaults):
                skinSwitch.swapSkins(defaults)
                x = 0
                xbmc.sleep(1000)
                while not xbmc.getCondVisibility(
                        "Window.isVisible(yesnodialog)") and x < 150:
                    x += 1
                    xbmc.sleep(200)

                if xbmc.getCondVisibility("Window.isVisible(yesnodialog)"):
                    wiz.ebi('SendClick(11)')
                    wiz.lookandFeelData('restore')
        if not wiz.currSkin() == defaults:
            gui = wiz.checkBuild(BUILDNAME, 'gui')
            FAILED = True
            if gui == 'http://':
                wiz.log("[Installed Check] Guifix was set to http://",
                        xbmc.LOGNOTICE)
                DIALOG.ok(
                    ADDONTITLE,
                    "[COLOR %s]It looks like the skin settings was not applied to the build."
                    % COLOR2, "Sadly no gui fix was attatched to the build",
                    "You will need to reinstall the build and make sure to do a force close[/COLOR]"
                )
            elif wiz.workingURL(gui):
                yes = DIALOG.yesno(
                    ADDONTITLE,
Exemplo n.º 4
0
	elif not EXTRACT == '100' and not BUILDNAME == "":
		wiz.log("[Installed Check] Build was extracted %s/100 with [ERRORS: %s]" % (EXTRACT, EXTERROR), xbmc.LOGNOTICE)
		yes=DIALOG.yesno(ADDONTITLE, '[COLOR %s]%s[/COLOR] [COLOR %s]was not installed correctly!' % (COLOR1, COLOR2, BUILDNAME), 'Installed: [COLOR %s]%s[/COLOR] / Error Count: [COLOR %s]%s[/COLOR]' % (COLOR1, EXTRACT, COLOR1, EXTERROR), 'Would you like to try again?[/COLOR]', nolabel='[B]No Thanks![/B]', yeslabel='[B]Retry Install[/B]')
		wiz.clearS('build')
		FAILED = True
		if yes:
			wiz.ebi("PlayMedia(plugin://%s/?mode=install&name=%s&url=fresh)" % (ADDON_ID, urllib.quote_plus(BUILDNAME)))
			wiz.log("[Installed Check] Fresh Install Re-activated", xbmc.LOGNOTICE)
		else: wiz.log("[Installed Check] Reinstall Ignored")
	elif SKIN in ['skin.confluence', 'skin.estuary']:
		wiz.log("[Installed Check] Incorrect skin: %s" % SKIN, xbmc.LOGNOTICE)
		defaults = wiz.getS('defaultskin')
		if not defaults == '':
			if os.path.exists(os.path.join(ADDONS, defaults)):
				if wiz.swapSkins(defaults):
					wiz.lookandFeelData('restore')
		if not wiz.currSkin() == defaults and not BUILDNAME == "":
			gui = wiz.checkBuild(BUILDNAME, 'gui')
			FAILED = True
			if gui == 'http://':
				wiz.log("[Installed Check] Guifix was set to http://", xbmc.LOGNOTICE)
				DIALOG.ok(ADDONTITLE, "[COLOR %s]It looks like the skin settings was not applied to the build." % COLOR2, "Sadly no gui fix was attatched to the build", "You will need to reinstall the build and make sure to do a force close[/COLOR]")
			elif wiz.workingURL(gui):
				yes=DIALOG.yesno(ADDONTITLE, '%s was not installed correctly!' % BUILDNAME, 'It looks like the skin settings was not applied to the build.', 'Would you like to apply the GuiFix?', nolabel='[B]No, Cancel[/B]', yeslabel='[B]Apply Fix[/B]')
				if yes: wiz.ebi("PlayMedia(plugin://%s/?mode=install&name=%s&url=gui)" % (ADDON_ID, urllib.quote_plus(BUILDNAME))); wiz.log("[Installed Check] Guifix attempting to install")
				else: wiz.log('[Installed Check] Guifix url working but cancelled: %s' % gui, xbmc.LOGNOTICE)
			else:
				DIALOG.ok(ADDONTITLE, "[COLOR %s]It looks like the skin settings was not applied to the build." % COLOR2, "Sadly no gui fix was attatched to the build", "You will need to reinstall the build and make sure to do a force close[/COLOR]")
				wiz.log('[Installed Check] Guifix url not working: %s' % gui, xbmc.LOGNOTICE)
	else:
		wiz.log('[Installed Check] Install seems to be completed correctly', xbmc.LOGNOTICE)
Exemplo n.º 5
0
def checkSkin():
    wiz.log("[Wizard] Skin no localizado")
    DEFAULTSKIN = wiz.getS('defaultskin')
    DEFAULTNAME = wiz.getS('defaultskinname')
    DEFAULTIGNORE = wiz.getS('defaultskinignore')
    gotoskin = False
    if not DEFAULTSKIN == '':
        if os.path.exists(os.path.join(ADDONS, DEFAULTSKIN)):
            if DIALOG.yesno(
                    ADDONTITLE,
                    "[COLOR %s]Parece que el skin se ha establecido de nuevo a [COLOR %s]%s[/COLOR]"
                    % (COLOR2, COLOR1, SKIN[5:].title()),
                    "Le gustaria volver a configurar el skin:[/COLOR]",
                    '[COLOR %s]%s[/COLOR]' % (COLOR1, DEFAULTNAME)):
                gotoskin = DEFAULTSKIN
                gotoname = DEFAULTNAME
            else:
                wiz.log("El skin no se reinicio", xbmc.LOGNOTICE)
                wiz.setS('defaultskinignore', 'true')
                gotoskin = False
        else:
            wiz.setS('defaultskin', '')
            wiz.setS('defaultskinname', '')
            DEFAULTSKIN = ''
            DEFAULTNAME = ''
    if DEFAULTSKIN == '':
        skinname = []
        skinlist = []
        for folder in glob.glob(os.path.join(ADDONS, 'skin.*/')):
            xml = "%s/addon.xml" % folder
            if os.path.exists(xml):
                f = open(xml, mode='r')
                g = f.read().replace('\n', '').replace('\r',
                                                       '').replace('\t', '')
                f.close()
                match = wiz.parseDOM(g, 'addon', ret='id')
                match2 = wiz.parseDOM(g, 'addon', ret='name')
                wiz.log("%s: %s" % (folder, str(match[0])), xbmc.LOGNOTICE)
                if len(match) > 0:
                    skinlist.append(str(match[0]))
                    skinname.append(str(match2[0]))
                else:
                    wiz.log("ID not found for %s" % folder, xbmc.LOGNOTICE)
            else:
                wiz.log("ID not found for %s" % folder, xbmc.LOGNOTICE)
        if len(skinlist) > 0:
            if len(skinlist) > 1:
                if DIALOG.yesno(
                        ADDONTITLE,
                        "[COLOR %s]Parece que el skin se ha establecido de nuevo a [COLOR %s]%s[/COLOR]"
                        % (COLOR2, COLOR1, SKIN[5:].title()),
                        "Le gustaria ver una lista de los skin disponibles?[/COLOR]"
                ):
                    choice = DIALOG.select("Seleccione el skin para cambiar",
                                           skinname)
                    if choice == -1:
                        wiz.log("El skin no se reinicio", xbmc.LOGNOTICE)
                        wiz.setS('defaultskinignore', 'true')
                    else:
                        gotoskin = skinlist[choice]
                        gotoname = skinname[choice]
                else:
                    wiz.log("El skin no se reinicio", xbmc.LOGNOTICE)
                    wiz.setS('defaultskinignore', 'true')
            else:
                if DIALOG.yesno(
                        ADDONTITLE,
                        "[COLOR %s]Parece que el skin se ha establecido de nuevo a [COLOR %s]%s[/COLOR]"
                        % (COLOR2, COLOR1, SKIN[5:].title()),
                        "Le gustaria volver a configurar el skin:[/COLOR]",
                        '[COLOR %s]%s[/COLOR]' % (COLOR1, skinname[0])):
                    gotoskin = skinlist[0]
                    gotoname = skinname[0]
                else:
                    wiz.log("El skin no se reinicio", xbmc.LOGNOTICE)
                    wiz.setS('defaultskinignore', 'true')
        else:
            wiz.log("No se encontraron skins en la carpeta de complementos.",
                    xbmc.LOGNOTICE)
            wiz.setS('defaultskinignore', 'true')
            gotoskin = False
    if gotoskin:
        skinSwitch.swapSkins(gotoskin)
        x = 0
        xbmc.sleep(1000)
        while not xbmc.getCondVisibility(
                "Window.isVisible(yesnodialog)") and x < 150:
            x += 1
            xbmc.sleep(200)

        if xbmc.getCondVisibility("Window.isVisible(yesnodialog)"):
            wiz.ebi('SendClick(11)')
            wiz.lookandFeelData('restore')
        else:
            wiz.LogNotify("[COLOR %s]%s[/COLOR]" % (COLOR1, ADDONTITLE),
                          '[COLOR %s]Tiempo agotato[/COLOR]' % COLOR2)
    wiz.log("[Build Check] Skin Error", xbmc.LOGNOTICE)
Exemplo n.º 6
0
def checkSkin():
    wiz.log("[Build Check] Invalid Skin Check Start")
    DEFAULTSKIN = wiz.getS('defaultskin')
    DEFAULTNAME = wiz.getS('defaultskinname')
    DEFAULTIGNORE = wiz.getS('defaultskinignore')
    gotoskin = False
    if not DEFAULTSKIN == '':
        if os.path.exists(os.path.join(ADDONS, DEFAULTSKIN)):
            if DIALOG.yesno(
                    ADDONTITLE,
                    "[COLOR %s]Es scheint der Skin wurde zuruck gesetzt auf [COLOR %s]%s[/COLOR]"
                    % (COLOR2, COLOR1, SKIN[5:].title()),
                    "Willst du den Skin zuruck setzten auf:[/COLOR]",
                    '[COLOR %s]%s[/COLOR]' % (COLOR1, DEFAULTNAME)):
                gotoskin = DEFAULTSKIN
                gotoname = DEFAULTNAME
            else:
                wiz.log("Skin was not reset", xbmc.LOGNOTICE)
                wiz.setS('defaultskinignore', 'true')
                gotoskin = False
        else:
            wiz.setS('defaultskin', '')
            wiz.setS('defaultskinname', '')
            DEFAULTSKIN = ''
            DEFAULTNAME = ''
    if DEFAULTSKIN == '':
        skinname = []
        skinlist = []
        for folder in glob.glob(os.path.join(ADDONS, 'skin.*/')):
            xml = "%s/addon.xml" % folder
            if os.path.exists(xml):
                f = open(xml, mode='r')
                g = f.read().replace('\n', '').replace('\r',
                                                       '').replace('\t', '')
                f.close()
                match = wiz.parseDOM(g, 'addon', ret='id')
                match2 = wiz.parseDOM(g, 'addon', ret='name')
                wiz.log("%s: %s" % (folder, str(match[0])), xbmc.LOGNOTICE)
                if len(match) > 0:
                    skinlist.append(str(match[0]))
                    skinname.append(str(match2[0]))
                else:
                    wiz.log("ID not found for %s" % folder, xbmc.LOGNOTICE)
            else:
                wiz.log("ID not found for %s" % folder, xbmc.LOGNOTICE)
        if len(skinlist) > 0:
            if len(skinlist) > 1:
                if DIALOG.yesno(
                        ADDONTITLE,
                        "[COLOR %s]Es scheint der Skin wurde zuruck gesetzt auf [COLOR %s]%s[/COLOR]"
                        % (COLOR2, COLOR1, SKIN[5:].title()),
                        "Willst du eine Liste aller Skins sehen?[/COLOR]"):
                    choice = DIALOG.select("Wahle Skin aus!", skinname)
                    if choice == -1:
                        wiz.log("Skin was not reset", xbmc.LOGNOTICE)
                        wiz.setS('defaultskinignore', 'true')
                    else:
                        gotoskin = skinlist[choice]
                        gotoname = skinname[choice]
                else:
                    wiz.log("Skin was not reset", xbmc.LOGNOTICE)
                    wiz.setS('defaultskinignore', 'true')
            else:
                if DIALOG.yesno(
                        ADDONTITLE,
                        "[COLOR %s]Es scheint der Skin wurde zuruck gesetzt auf [COLOR %s]%s[/COLOR]"
                        % (COLOR2, COLOR1, SKIN[5:].title()),
                        "Willst du den Skin zuruck setzten auf:[/COLOR]",
                        '[COLOR %s]%s[/COLOR]' % (COLOR1, skinname[0])):
                    gotoskin = skinlist[0]
                    gotoname = skinname[0]
                else:
                    wiz.log("Skin was not reset", xbmc.LOGNOTICE)
                    wiz.setS('defaultskinignore', 'true')
        else:
            wiz.log("No skins found in addons folder.", xbmc.LOGNOTICE)
            wiz.setS('defaultskinignore', 'true')
            gotoskin = False
    if gotoskin:
        skinSwitch.swapSkins(gotoskin)
        x = 0
        xbmc.sleep(1000)
        while not xbmc.getCondVisibility(
                "Window.isVisible(yesnodialog)") and x < 150:
            x += 1
            xbmc.sleep(200)

        if xbmc.getCondVisibility("Window.isVisible(yesnodialog)"):
            wiz.ebi('SendClick(11)')
            wiz.lookandFeelData('restore')
        else:
            wiz.LogNotify("[COLOR %s]%s[/COLOR]" % (COLOR1, ADDONTITLE),
                          '[COLOR %s]Skin Wechsel Timed Out![/COLOR]' % COLOR2)
    wiz.log("[Build Check] Invalid Skin Check End", xbmc.LOGNOTICE)