def get_listing(self): from resources.libs import test response = tools.open_url(CONFIG.BUILDFILE) if response: link = tools.clean_text(response.text) else: directory.add_file('Kodi Version: {0}'.format(CONFIG.KODIV), icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) directory.add_dir('Save Data Menu', {'mode': 'savedata'}, icon=CONFIG.ICONSAVE, themeit=CONFIG.THEME3) directory.add_separator() directory.add_file('URL for txt file not valid', icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) directory.add_file('{0}'.format(CONFIG.BUILDFILE), icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) return total, count19, adultcount, hidden = check.build_count() match = re.compile('name="(.+?)".+?ersion="(.+?)".+?rl="(.+?)".+?ui="(.+?)".+?odi="(.+?)".+?heme="(.+?)".+?con="(.+?)".+?anart="(.+?)".+?dult="(.+?)".+?escription="(.+?)"').findall(link) if total == 1: for name, version, url, gui, kodi, theme, icon, fanart, adult, description in match: if not CONFIG.SHOWADULT == 'true' and adult.lower() == 'yes': continue if not CONFIG.DEVELOPER == 'true' and test.str_test(name): continue self.view_build(match[0][0]) return directory.add_file('Kodi Version: {0}'.format(CONFIG.KODIV), icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) directory.add_dir('Save Data Menu', {'mode': 'savedata'}, icon=CONFIG.ICONSAVE, themeit=CONFIG.THEME3) directory.add_separator() if len(match) >= 1: if CONFIG.SEPARATE == 'true': self._list_all(match) else: if count19 > 0: state = '+' if CONFIG.SHOW19 == 'false' else '-' directory.add_file('[B]{0} Matrix Builds ({1})[/B]'.format(state, count19), {'mode': 'togglesetting', 'name': 'show19'}, themeit=CONFIG.THEME3) if CONFIG.SHOW19 == 'true': self._list_all(match, kodiv=19) elif hidden > 0: if adultcount > 0: directory.add_file('There is currently only Adult builds', icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) directory.add_file('Enable Show Adults in Addon Settings > Misc', icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) else: directory.add_file('Currently No Builds Offered from {0}'.format(CONFIG.ADDONTITLE), icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) else: directory.add_file('Text file for builds not formatted correctly.', icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3)
def get_listing(self): from resources.libs import test response = tools.open_url(CONFIG.BUILDFILE) if response: link = tools.clean_text(response.text) else: directory.add_file( '[B]Version Kodi:[/B] [COLOR azure]{0}[/COLOR] {0}'.format( CONFIG.KODIV), icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) directory.add_dir('[B][COLOR azure]MENU GUARDAR DATOS[/COLOR][/B]', {'mode': 'savedata'}, icon=CONFIG.ICONSAVE, themeit=CONFIG.THEME3) directory.add_separator() directory.add_file('URL para archivo txt no valido', icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) directory.add_file('{0}'.format(CONFIG.BUILDFILE), icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) return total, count19, adultcount, hidden = check.build_count() match = re.compile( 'name="(.+?)".+?ersion="(.+?)".+?rl="(.+?)".+?ui="(.+?)".+?odi="(.+?)".+?heme="(.+?)".+?con="(.+?)".+?anart="(.+?)".+?dult="(.+?)".+?escription="(.+?)"' ).findall(link) if total == 1: for name, version, url, gui, kodi, theme, icon, fanart, adult, description in match: if not CONFIG.SHOWADULT == 'true' and adult.lower() == 'yes': continue if not CONFIG.DEVELOPER == 'true' and test.str_test(name): continue self.view_build(match[0][0]) return directory.add_file( '[B]Version Kodi:[/B] [COLOR azure]{0}[/COLOR]'.format( CONFIG.KODIV), icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) directory.add_dir('[B][COLOR azure]MENU GUARDAR DATOS[/COLOR][/B]', {'mode': 'savedata'}, icon=CONFIG.ICONSAVE, themeit=CONFIG.THEME3) directory.add_separator() if len(match) >= 1: if CONFIG.SEPARATE == 'true': self._list_all(match) else: if count19 > 0: state = '[COLOR azure]+[/COLOR]' if CONFIG.SHOW19 == 'false' else '[COLOR azure]-[/COLOR]' directory.add_file( '[B][COLOR dodgerblue]{0} BUILDS:[/COLOR][/B][COLOR azure][B] GTKING[/COLOR] [COLOR lime]MATRIX[/B][/COLOR]' .format(state, count19), { 'mode': 'togglesetting', 'name': 'show19' }, themeit=CONFIG.THEME3) if CONFIG.SHOW19 == 'true': self._list_all(match, kodiv=19) elif hidden > 0: if adultcount > 0: directory.add_file( '[COLOR azure]Actualmente Solo hay Builds para Adultos[COLOR]', icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) directory.add_file( '[COLOR azure]Habilitar Mostrar Adultos en los Ajustes de Addon[COLOR] > Misc', icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) else: directory.add_file( '[COLOR azure]Actualmente No Se Ofrecen Builds de[COLOR] {0}' .format(CONFIG.ADDONTITLE), icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) else: directory.add_file( '[COLOR azure]El archivo de texto para la Build no tiene el formato correcto.[COLOR]', icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3)
def get_listing(self): from resources.libs import test if 42 - 42: oO0o - i1IIi / i11iIiiIii + OOooOOo + OoO0O00 iiiI11 = tools.open_url(CONFIG.BUILDFILE) if 17 - 17: oO0o.Oo0Ooo.I1ii11iIi11i if iiiI11: oOoOo00oOo = tools.clean_text(iiiI11.text) else: directory.add_file('Versão Kodi: {0}'.format(CONFIG.KODIV), icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) directory.add_dir('Menu Salvar Dados', {'mode': 'savedata'}, icon=CONFIG.ICONSAVE, themeit=CONFIG.THEME3) directory.add_separator() directory.add_file('URL para arquivo txt não é válido', icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) directory.add_file('{0}'.format(CONFIG.BUILDFILE), icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) return if 3 - 3: OoOoOO00.Oo0Ooo.I1IiiI / Ii1I IiiiI1II1I1, ooIi11iI1i, Ooo, O0o0Oo = check.build_count() if 78 - 78: iIii1I11I1II1 - Ii1I * OoO0O00 + o0oOOo0O0Ooo + iii1I1I + iii1I1I Oo = re.compile( 'name="(.+?)".+?ersion="(.+?)".+?rl="(.+?)".+?ui="(.+?)".+?odi="(.+?)".+?heme="(.+?)".+?con="(.+?)".+?anart="(.+?)".+?dult="(.+?)".+?escription="(.+?)"' ).findall(oOoOo00oOo) if 11 - 11: iii1I1I - OoO0O00 % Oo0ooO0oo0oO % iii1I1I / OoOoOO00 - OoO0O00 if IiiiI1II1I1 == 1: for oo00, o00, Oo0oO0ooo, o0oOoO00o, i1, oOOoo00O0O, i1111, i11, I11, Oo0o0000o0o0 in Oo: if not CONFIG.SHOWADULT == 'true' and I11.lower() == 'yes': continue if not CONFIG.DEVELOPER == 'true' and test.str_test(oo00): continue if 74 - 74: iii1I1I * O0 self.view_build(Oo[0][0]) return if 89 - 89: oO0o + Oo0Ooo directory.add_file('Versão Kodi: {0}'.format(CONFIG.KODIV), icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) directory.add_dir('Menu Salvar Dados', {'mode': 'savedata'}, icon=CONFIG.ICONSAVE, themeit=CONFIG.THEME3) directory.add_separator() if 3 - 3: i1IIi / I1IiiI % I11i * i11iIiiIii / O0 * I11i if len(Oo) >= 1: if CONFIG.SEPARATE == 'true': self._list_all(Oo) else: if ooIi11iI1i > 0: III1ii1iII = '+' if CONFIG.SHOW19 == 'false' else '-' directory.add_file('[B]{0} Matrix Builds ({1})[/B]'.format( III1ii1iII, ooIi11iI1i), { 'mode': 'togglesetting', 'name': 'show19' }, themeit=CONFIG.THEME3) if CONFIG.SHOW19 == 'true': self._list_all(Oo, kodiv=19) if 54 - 54: I1IiiI % II111iiii % II111iiii elif O0o0Oo > 0: if Ooo > 0: directory.add_file( 'No momento, há apenas construções para adultos', icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) directory.add_file( 'Habilite Mostrar Adultos em Configurações do Complemento > Diversos', icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) else: directory.add_file( 'Atualmente não há construções oferecidas de {0}'.format( CONFIG.ADDONTITLE), icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) else: directory.add_file( 'Arquivo de texto para compilações formatado incorretamente.', icon=CONFIG.ICONBUILDS, themeit=CONFIG.THEME3) if 13 - 13: o0oOOo0O0Ooo.Ii1I