Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #encoding=utf-8
- import sys
- #===============================================================================
- # reload(sys)
- # sys.setdefaultencoding('utf8')
- #===============================================================================
- import xbmcgui,xbmcplugin,urlparse,urllib,requests,json,xbmcaddon,xbmc
- import re,base64
- import unicodedata
- from datetime import datetime, timedelta
- import time
- import youtube_resolver
- import random
- from resolveurl.plugins.lib import jsunpack
- from sources import main
- base_url = sys.argv[0]
- addon_handle = int(sys.argv[1])
- args = urlparse.parse_qs(sys.argv[2][1:])
- my_addon = xbmcaddon.Addon()
- PATH = my_addon.getAddonInfo('path')
- LETRAS = ("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
- def obtener_args(text):
- respuesta = ''
- if text != '':
- try:
- clave = my_addon.getAddonInfo('id')
- text = text.replace('%5d', ']')
- text = base64.b64decode(text.replace(']', '='))
- traducido = []
- indice_clave = 0
- clave = clave.upper()
- for symbol in text:
- num = LETRAS.find(symbol.upper())
- if num != -1:
- num -= LETRAS.find(clave[indice_clave])
- num %= len(LETRAS)
- if symbol.isupper():
- traducido.append(LETRAS[num])
- elif symbol.islower():
- traducido.append(LETRAS[num].lower())
- indice_clave += 1
- if indice_clave == len(clave):
- indice_clave = 0
- else:
- traducido.append(symbol)
- text = ('').join(traducido)
- text = base64.b64decode(text)
- return urlparse.parse_qs(text)
- except:
- pass
- return urlparse.parse_qs(respuesta)
- args = obtener_args(sys.argv[2][1:])
- def lang_lang(lang_in):
- try:
- if 'Spanish' in xbmc.getLanguage():
- return lang_in.split('$')[0]
- elif 'English' in xbmc.getLanguage():
- return lang_in.split('$')[1]
- elif 'French' in xbmc.getLanguage():
- return lang_in.split('$')[2]
- else:
- return lang_in.split('$')[1]
- except:
- return lang_in
- def solo_nums(text_in):
- return ''.join([n for n in text_in if n.isdigit()])
- def strip_accents(text):
- #===========================================================================
- # cambie el decode por que me tiraba error al decodificar LEÓN
- #===========================================================================
- codecs=['utf8', 'cp1252']
- for i in codecs:
- try:
- text = text.decode(i)
- break
- except UnicodeDecodeError:
- pass
- text = unicodedata.normalize('NFD', text)\
- .encode('ascii', 'ignore')\
- .decode("utf-8")
- return str(text)
- def only_legal_chars(string_in):
- string_out = strip_accents(string_in)
- string_out = re.sub(r'[\\/":*?<>|]+', "", string_out)
- string_out = "".join(i for i in string_out if ord(i)<128)
- string_out = ' '.join(string_out.split())
- return string_out
- def build_url(query):
- query = urllib.urlencode(query)
- if query != '':
- clave = my_addon.getAddonInfo('id')
- query = base64.b64encode(query)
- traducido = []
- indice_clave = 0
- clave = clave.upper()
- for symbol in query:
- num = LETRAS.find(symbol.upper())
- if num != -1:
- num += LETRAS.find(clave[indice_clave])
- num %= len(LETRAS)
- if symbol.isupper():
- traducido.append(LETRAS[num])
- elif symbol.islower():
- traducido.append(LETRAS[num].lower())
- indice_clave += 1
- if indice_clave == len(clave):
- indice_clave = 0
- else:
- traducido.append(symbol)
- query = ('').join(traducido)
- query = base64.b64encode(query)
- return base_url + '?' + query.replace('=', ']')
- def monta(texto):
- texto = texto.replace("~\n","\n")
- r = []
- a = texto.split('###')
- for b in range(1, len(a)):
- c = a[b].split('~')
- for d in c:
- r.append(d.split('~'))
- return r
- def get_lista(order_in):
- if 'Spanish' in xbmc.getLanguage():
- n = 0
- elif 'English' in xbmc.getLanguage():
- n = 1
- elif 'French' in xbmc.getLanguage():
- n = 2
- else:
- n = 1
- headers = {
- 'Connection': 'keep-alive',
- 'Pragma': 'no-cache',
- 'Cache-Control': 'no-cache',
- 'Upgrade-Insecure-Requests': '1',
- 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36',
- 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
- 'Sec-Fetch-Site': 'none',
- 'Sec-Fetch-Mode': 'navigate',
- 'Sec-Fetch-User': '?1',
- 'Sec-Fetch-Dest': 'document',
- 'Accept-Language': 'es-ES,es;q=0.9'
- }
- text = requests.get('https://github.com/WinnerAlex303/winner_data/blob/master/winner.txt?raw=true', headers=headers).text
- #f = open('/home/alex/winner_brain/winner_data/winner.txt', "r")
- #text = f.read()
- #f.close()
- text = base64.b64decode(text)
- text = text.replace('º','a')
- text = text.replace('ª','B')
- text = text.replace('!','c')
- text = text.replace('|','D')
- text = text.replace('"','e')
- text = text.replace('@','F')
- text = text.replace('·','h')
- text = text.replace('#','I')
- text = text.replace('$','j')
- text = text.replace('%','K')
- text = text.replace('&','l')
- text = text.replace('¬','M')
- text = text.replace('(','n')
- text = text.replace('?','O')
- text = text.replace('¡','p')
- text = text.replace('¿','Q')
- text = text.replace('^','r')
- text = text.replace('[','S')
- text = text.replace(')','u')
- text = text.replace(']','T')
- text = text.replace('*','v')
- text = text.replace(';','W')
- text = text.replace('{','x')
- text = text.replace(':','Y')
- text = text.replace('.','z')
- text = text.replace('}','R')
- text = base64.b64decode(text)
- listado = text.strip().split("\n")
- lineas = []
- now_timestamp = time.time()
- offset = datetime.fromtimestamp(now_timestamp) - datetime.utcfromtimestamp(now_timestamp)
- for l in listado:
- ll = l.split('~')
- try:
- ll[4] = ll[4].split('$')[n]
- except:
- pass
- try:
- ll[9] = ll[9].split('$')[n]
- except:
- pass
- ll[5] = str(datetime.fromtimestamp(time.mktime(time.strptime(ll[5], "%Y%m%d%H%M%S"))) + offset).replace('-','').replace(' ','').replace(':','')
- if ll[0] == '':
- ll[0] = ll[4]
- if ll[14] == '-':
- ll[14] = '999'
- if ll[15] == '-' or ll[15] == '':
- ll[15] = '999'
- lineas.append(ll)
- if order_in != 0:
- lineas = sorted(lineas, key = lambda i: int(i[order_in]),reverse=False)
- return lineas
- def format_fecha(fecha_in):
- if fecha_in == '-':
- return '19801010101010'
- f = list(fecha_in)
- return f[6] + f[7] + '/' + f[4] + f[5] + ' ' + f[8] + f[9] + ':' + f[10] + f[11]
- def get_color(hora_in):
- if hora_in == '-':
- hora_in = '19801010101010'
- timestamp_actual = time.mktime(datetime.now().timetuple())
- timestamp_evento = time.mktime(datetime.fromtimestamp(time.mktime(time.strptime(hora_in,'%Y%m%d%H%M%S'))).timetuple())
- diff_tiempo = timestamp_actual - timestamp_evento
- if diff_tiempo > -18000 and diff_tiempo < -1800:
- return 'orangered'
- elif diff_tiempo > -1800 and diff_tiempo < 7200:
- return 'springgreen'
- elif diff_tiempo > 7200 and diff_tiempo < 18000:
- return 'orangered'
- else:
- return 'whitesmoke'
- def get_text(id_text):
- return my_addon.getLocalizedString(id_text).encode('utf-8')
- def ordena_enlaces(enlaces_in):
- q_4k = []
- q_2k = []
- q_1080 = []
- q_720 = []
- q_kbps = []
- q_480 = []
- q_360 = []
- q_320 = []
- q_resto = []
- for enlace in enlaces_in:
- if enlace['q'] == '4K':
- q_4k.append(enlace)
- elif enlace['q'] == '2K':
- q_2k.append(enlace)
- elif enlace['q'] == '1080p':
- q_1080.append(enlace)
- elif enlace['q'] == '720p':
- q_720.append(enlace)
- elif 'kbps' in enlace['q']:
- enlace['qq'] = int(''.join(filter(str.isdigit, enlace['q'])))
- q_kbps.append(enlace)
- elif enlace['q'] == '480p':
- q_480.append(enlace)
- elif enlace['q'] == '360p':
- q_360.append(enlace)
- elif enlace['q'] == '320p':
- q_320.append(enlace)
- else:
- q_resto.append(enlace)
- q_kbps = sorted(q_kbps, key = lambda i: i['qq'],reverse=True)
- enlaces_q = q_4k + q_2k + q_1080 + q_720 + q_kbps + q_480 + q_360 + q_320 + q_resto
- enlaces_por_idioma = []
- enlaces_ingles = []
- resto = []
- order_lang2 = ''
- if 'Spanish' in xbmc.getLanguage():
- order_lang1 = 'ESP'
- order_lang2 = 'ING'
- elif 'English' in xbmc.getLanguage():
- order_lang1 = 'ING'
- elif 'French' in xbmc.getLanguage():
- order_lang1 = 'FRA'
- order_lang2 = 'ANG'
- else:
- order_lang1 = 'ING'
- if order_lang2 != '':
- for enlace in enlaces_q:
- if order_lang1 == enlace['l']:
- enlaces_por_idioma.append(enlace)
- elif order_lang2 == enlace['l']:
- enlaces_ingles.append(enlace)
- else:
- resto.append(enlace)
- else:
- for enlace in enlaces_q:
- if order_lang1 == enlace['l']:
- enlaces_ingles.append(enlace)
- else:
- resto.append(enlace)
- return enlaces_por_idioma + enlaces_ingles + resto
- tarea = args.get('tarea', None)
- blancos = ''
- if tarea is None:
- try:
- contador = requests.get('http://bit.ly/Winner_contador', headers={'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36'})
- except:
- pass
- lineas = get_lista(14)
- url=build_url({'tarea':'hot'})
- item=xbmcgui.ListItem('[B]' + get_text(33001) + '[/B]', iconImage=PATH + '/resources/media/live.gif')
- item.setInfo(type="Video",infoLabels={"plot":get_text(33002), "Title":'[B]' + get_text(33001) + '[/B]'})
- item.setArt({'fanart':PATH + '/fanart.jpg', 'poster':PATH + '/resources/media/live.gif', 'icon':PATH + '/resources/media/live.gif'})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- deportes = []
- encontrados = ''
- for linea in lineas:
- if '#' + linea[9] + '#' not in encontrados:
- deportes.append({
- 'n':linea[9],
- 'i':linea[12],
- 'f':linea[13]
- })
- encontrados = encontrados + '#' + linea[9] + '#'
- for deporte in deportes:
- if deporte['i'] != blancos:
- url=build_url({'tarea':'competis','deporte':deporte['n']})
- item=xbmcgui.ListItem('[B]' + deporte['n'] + '[/B]', iconImage=deporte['i'])
- item.setInfo(type="Video",infoLabels={"plot":deporte['n'], "Title":'[B]' + deporte['n'] + '[/B]'})
- item.setArt({'fanart':deporte['f'], 'poster':deporte['i'], 'icon':deporte['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- xbmcplugin.endOfDirectory(addon_handle)
- elif tarea[0]=='hot':
- tiempo_ahora = time.mktime(time.strptime(str(datetime.now().strftime("%Y%m%d%H%M%S")), "%Y%m%d%H%M%S"))
- lineas = get_lista(15)
- competis = []
- encontrados = ''
- for linea in lineas:
- if '#' + linea[4] + '~' + linea[9] + '#' not in encontrados:
- tiempo = time.mktime(time.strptime(linea[5], "%Y%m%d%H%M%S"))
- diff = tiempo - tiempo_ahora
- if diff >= -10800 and diff <= 10800:
- competis.append({
- 'n':linea[4],
- 'i':linea[10],
- 'f':linea[11],
- 't':linea[5],
- 'd':linea[9]
- })
- encontrados = encontrados + '#' + linea[4] + '~' + linea[9] + '#'
- lineas = get_lista(0)
- eventos = []
- encontrados = ''
- for linea in lineas:
- if '#' + linea[0] + '~' + linea[4] + '~' + linea[9] + '#' not in encontrados:
- tiempo = time.mktime(time.strptime(linea[5], "%Y%m%d%H%M%S"))
- diff = tiempo - tiempo_ahora
- if diff >= -10800 and diff <= 10800:
- eventos.append({
- 'n':linea[0],
- 'd':format_fecha(linea[5]),
- 'o':linea[5],
- 't':linea[6],
- 'i':linea[7],
- 'f':linea[8],
- 'c':linea[4],
- 's':linea[9]
- })
- encontrados = encontrados + '#' + linea[0] + '~' + linea[4] + '~' + linea[9] + '#'
- eventos = sorted(eventos, key = lambda i: i['o'],reverse=False)
- """
- KABYLIE - BELOUIZDAD~
- http://cdn.sportcast.fun/webplayer.php?t=ifrx&c=1499585&lang=en&eid=1011710&lid=1499585&ci=958&si=1~
- -~
- -~
- PRIMERA DIVISIÓN DE ALGERIA~
- 20201211150000~
- ~
- https://i.imgur.com/dzflmHa.jpg~
- https://www.irishtimes.com/polopoly_fs/1.1907346.1408968521!/image/image.jpg_gen/derivatives/box_620_330/image.jpg~
- FÚTBOL~
- https://i.imgur.com/dzflmHa.jpg~
- https://www.irishtimes.com/polopoly_fs/1.1907346.1408968521!/image/image.jpg_gen/derivatives/box_620_330/image.jpg~
- https://i.imgur.com/F8FKJjp.jpg~
- https://wallpaperstock.net/wallpapers/thumbs1/21883wide.jpg~
- 1~
- 90~
- """
- lineas = get_lista(14)
- deportes = []
- encontrados = ''
- for linea in lineas:
- if '#' + linea[9] + '#' not in encontrados:
- tiempo = time.mktime(time.strptime(linea[5], "%Y%m%d%H%M%S"))
- diff = tiempo - tiempo_ahora
- if diff >= -10800 and diff <= 10800:
- deportes.append({
- 'n':linea[9],
- 'i':linea[12],
- 'f':linea[13]
- })
- encontrados = encontrados + '#' + linea[9] + '#'
- for deporte in deportes:
- """
- url=build_url({'tarea':'competis','deporte':deporte['n']})
- item=xbmcgui.ListItem('[B]' + deporte['n'] + '[/B]', iconImage=deporte['i'])
- item.setInfo(type="Video",infoLabels={"plot":deporte['n'], "Title":'[B]' + deporte['n'] + '[/B]'})
- item.setArt({'fanart':deporte['f'], 'poster':deporte['i'], 'icon':deporte['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- """
- for competi in competis:
- if competi['d'] == deporte['n']:
- if competi['i'] != blancos:
- url=build_url({'tarea':'eventos','competi':competi['n'],'deporte':competi['d']})
- item=xbmcgui.ListItem('[B]' + deporte['n'] + ' | [COLOR antiquewhite]' + competi['n'] + '[/COLOR][/B]', iconImage=deporte['i'])
- item.setInfo(type="Video",infoLabels={"plot":competi['n'], "Title":'[B]' + deporte['n'] + ' | [COLOR antiquewhite]' + competi['n'] + '[/COLOR][/B]'})
- item.setArt({'fanart':deporte['f'], 'poster':deporte['i'], 'icon':deporte['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- for evento in eventos:
- if evento['i'] != blancos:
- if competi['n'] == evento['c'] and competi['d'] == evento['s']:
- if evento['n'].strip() != '-':
- color = get_color(evento['o'])
- if color == 'orangered' or color == 'springgreen':
- titulo = ' > [B][COLOR ' + color + ']' + evento['d'] + '[/COLOR] | ' + evento['n'] + '[/B]'
- else:
- titulo = ' > [COLOR ' + color + '][I]' + evento['d'] + ' | ' + evento['n'] + '[/I][/COLOR]'
- if evento['t'] == '':
- plot = evento['n']
- else:
- plot = evento['t']
- try:
- url=build_url({'tarea':'enlaces','evento':evento['n'],'fanart':evento['f'], 'poster':evento['i'], 'd':evento['d']})
- except:
- url=build_url({'tarea':'enlaces','evento':evento['n'],'fanart':evento['f'], 'poster':evento['i'], 'd':evento['d']})
- item=xbmcgui.ListItem(titulo, iconImage=evento['i'])
- item.setInfo(type="Video",infoLabels={"plot":plot, "Title":titulo})
- item.setArt({'fanart':evento['f'], 'poster':evento['i'], 'icon':evento['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- xbmcplugin.endOfDirectory(addon_handle)
- """
- lineas = get_lista(15)
- competis = []
- encontrados2 = ''
- for linea2 in lineas2:
- if '#' + linea2[4] + '~' + linea2[9] + '#' not in encontrados2:
- competis.append({
- 'n':linea2[4],
- 'i':linea2[10],
- 'f':linea2[11],
- 't':linea2[5]
- })
- encontrados2 = encontrados2 + '#' + linea2[4] + '~' + linea[9] + '#'
- for competi in competis:
- tiempo = time.mktime(time.strptime(competi['t'], "%Y%m%d%H%M%S"))
- diff = tiempo - tiempo_ahora
- if diff >= -3600 and diff <= 3600:
- url=build_url({'tarea':'eventos','competi':competi['n']})
- item=xbmcgui.ListItem('[B]' + competi['n'] + '[/B]', iconImage=competi['i'])
- item.setInfo(type="Video",infoLabels={"plot":competi['n'], "Title":'[B]' + competi['n'] + '[/B]'})
- item.setArt({'fanart':competi['f'], 'poster':competi['i'], 'icon':competi['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- xbmcplugin.endOfDirectory(addon_handle)
- """
- elif tarea[0]=='competis':
- lineas = get_lista(15)
- competis = []
- encontrados = ''
- for linea in lineas:
- if '#' + linea[4] + '~' + linea[9] + '#' not in encontrados:
- if only_legal_chars(linea[9]) == only_legal_chars(args['deporte'][0]):
- competis.append({
- 'n':linea[4],
- 'i':linea[10],
- 'f':linea[11]
- })
- encontrados = encontrados + '#' + linea[4] + '~' + linea[9] + '#'
- for competi in competis:
- if competi['i'] != blancos:
- url=build_url({'tarea':'eventos','competi':competi['n'],'deporte':args['deporte'][0]})
- item=xbmcgui.ListItem('[B]' + competi['n'] + '[/B]', iconImage=competi['i'])
- item.setInfo(type="Video",infoLabels={"plot":competi['n'], "Title":'[B]' + competi['n'] + '[/B]'})
- item.setArt({'fanart':competi['f'], 'poster':competi['i'], 'icon':competi['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- xbmcplugin.endOfDirectory(addon_handle)
- elif tarea[0]=='eventos':
- lineas = get_lista(0)
- eventos = []
- encontrados = ''
- for linea in lineas:
- if '#' + linea[0] + '~' + linea[4] + '~' + linea[9] + '#' not in encontrados:
- if only_legal_chars(linea[4]) == only_legal_chars(args['competi'][0]) and only_legal_chars(linea[9]) == only_legal_chars(args['deporte'][0]):
- eventos.append({
- 'n':linea[0],
- 'd':format_fecha(linea[5]),
- 'o':linea[5],
- 't':linea[6],
- 'i':linea[7],
- 'f':linea[8]
- })
- encontrados = encontrados + '#' + linea[0] + '~' + linea[4] + '~' + linea[9] + '#'
- eventos = sorted(eventos, key = lambda i: i['o'],reverse=False)
- for evento in eventos:
- if evento['n'].strip() != '-':
- if evento['i'] != blancos:
- color = get_color(evento['o'])
- if color == 'orangered' or color == 'springgreen':
- titulo = '[B][COLOR ' + color + ']' + evento['d'] + '[/COLOR] | ' + evento['n'] + '[/B]'
- else:
- titulo = '[COLOR ' + color + '][I]' + evento['d'] + ' | ' + evento['n'] + '[/I][/COLOR]'
- if evento['t'] == '':
- plot = evento['n']
- else:
- plot = evento['t']
- url=build_url({'tarea':'enlaces','evento':evento['n'],'fanart':evento['f'], 'poster':evento['i'], 'd':evento['d']})
- item=xbmcgui.ListItem(titulo, iconImage=evento['i'])
- item.setInfo(type="Video",infoLabels={"plot":plot, "Title":titulo})
- item.setArt({'fanart':evento['f'], 'poster':evento['i'], 'icon':evento['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- xbmcplugin.endOfDirectory(addon_handle)
- elif tarea[0]=='enlaces':
- lineas = get_lista(0)
- enlaces = []
- encontrados = ''
- for linea in lineas:
- if '#' + linea[1] + '~' + linea[0] + '~' + linea[4] + '~' + linea[9] + '#' not in encontrados:
- if only_legal_chars(linea[0]) == only_legal_chars(args['evento'][0]):
- enlaces.append({
- 'n':linea[0],
- 'd':args['d'][0],
- 'u':linea[1],
- 't':linea[6],
- 'i':args['poster'][0],
- 'f':args['fanart'][0],
- 'l':lang_lang(linea[2]),
- 'fl':linea[2],
- 'q':linea[3],
- 'c':linea[4]
- })
- encontrados = encontrados + '#' + linea[1] + '~' + linea[0] + '~' + linea[4] + '~' + linea[9] + '#'
- enlaces_por_orden = ordena_enlaces(enlaces)
- e = 1
- for enlace in enlaces_por_orden:
- if enlace['i'] != blancos:
- if enlace['l'] != '-':
- l = enlace['l'] + ' | '
- else:
- l = ''
- if enlace['d'] != '-':
- d = enlace['d'] + ' | '
- else:
- d = ''
- if enlace['q'] != '-':
- q = enlace['q'] + ' | '
- else:
- q = ''
- if 'linkotes:' in enlace['u'] or 'acestream:' in enlace['u']:
- titulo = 'ACE ' + str(e) + ' | ' + l + d + q + enlace['n'] + ' | Acestream'
- plot = enlace['n'] + "\n\n" + enlace['c'] + "\n\n" + 'ACE ' + str(e) + ' | ' + l + d + q
- else:
- titulo = 'OP ' + str(e) + ' | ' + l + d + q + enlace['n']
- plot = enlace['n'] + "\n\n" + enlace['c'] + "\n\n" + 'OP ' + str(e) + ' | ' + l + d + q
- plot_p = plot.split('|')
- plot_p.pop()
- plot = '|'.join(plot_p).strip()
- item=xbmcgui.ListItem(titulo, iconImage=enlace['i'])
- item.setLabel(titulo)
- item.setInfo(type="Video", infoLabels = {"plot" : plot, 'Title': titulo})
- item.setArt({'fanart':enlace['f'], 'poster':enlace['i'], 'icon':enlace['i']})
- if '//dailysport' in enlace['u']:
- url=build_url({'tarea':'resolve','resuelve':'dailysport','url':enlace['u'],'titulo':titulo,'plot':plot,'fanart':enlace['f'], 'poster':enlace['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- elif 'dpelota.com/' in enlace['u']:
- url=build_url({'tarea':'resolve','resuelve':'dpelota','url':enlace['u'],'titulo':titulo,'plot':plot,'fanart':enlace['f'], 'poster':enlace['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- elif 'assia1.tv' in enlace['u']:
- url=build_url({'tarea':'resolve','resuelve':'assia','url':enlace['u'],'titulo':titulo,'plot':plot,'fanart':enlace['f'], 'poster':enlace['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- elif 'iraffletv.com/' in enlace['u']:
- url=build_url({'tarea':'resolve','resuelve':'iraffletv','url':enlace['u'],'titulo':titulo,'plot':plot,'fanart':enlace['f'], 'poster':enlace['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- elif 'sportcast.fun' in enlace['u'] or 'sportcast.life' in enlace['u'] or 'yoursports.stream' in enlace['u'] or 'cdn.livetv' in enlace['u']:
- url=build_url({'tarea':'resolve','resuelve':'sportcast','url':enlace['u'],'titulo':titulo,'plot':plot,'fanart':enlace['f'], 'poster':enlace['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- elif 'youtube' in enlace['u']:
- url=build_url({'tarea':'resolve','resuelve':'youtube','url':enlace['u'],'titulo':titulo,'plot':plot,'fanart':enlace['f'], 'poster':enlace['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- elif 'sports-stream.link' in enlace['u']:
- url=build_url({'tarea':'resolve','resuelve':'sports-stream','url':enlace['u'],'titulo':titulo,'plot':plot,'fanart':enlace['f'], 'poster':enlace['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- elif 'rojadirectatv' in enlace['u']:
- url=build_url({'tarea':'resolve','resuelve':'rojadirectatv','url':enlace['u'],'titulo':titulo,'plot':plot,'fanart':enlace['f'], 'poster':enlace['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- elif 'sportzonline' in enlace['u']:
- url=build_url({'tarea':'resolve','resuelve':'sportzonline','url':enlace['u'],'titulo':titulo,'plot':plot,'fanart':enlace['f'], 'poster':enlace['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- elif 'daddylive' in enlace['u']:
- url=build_url({'tarea':'resolve','resuelve':'daddylive','url':enlace['u'],'titulo':titulo,'plot':plot,'fanart':enlace['f'], 'poster':enlace['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- elif 'gooru.live' in enlace['u']:
- url=build_url({'tarea':'resolve','resuelve':'gooru','url':enlace['u'],'titulo':titulo,'plot':plot,'fanart':enlace['f'], 'poster':enlace['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- elif 'tinyurl' in enlace['u']:
- url=build_url({'tarea':'resolve','resuelve':'tinyurl','url':enlace['u'],'titulo':titulo,'plot':plot,'fanart':enlace['f'], 'poster':enlace['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- elif 'linkotes:' in enlace['u'] or 'acestream:' in enlace['u'] or 'footters:' in enlace['u'] or 'resolver:' in enlace['u'] or 'twitch:' in enlace['u']:
- r = enlace['u'].split(':')
- r_url = enlace['u'].replace(r[0] + ':','')
- url=build_url({'tarea':'resolve','resuelve':r[0],'url':r_url,'titulo':titulo,'plot':plot,'fanart':enlace['f'], 'poster':enlace['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- else:
- url=build_url({'tarea':'resolve','resuelve':'footters','url':enlace['u'],'titulo':titulo,'plot':plot,'fanart':enlace['f'], 'poster':enlace['i']})
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=url,listitem=item,isFolder=True)
- #enlace['u'] = enlace['u'].replace('gusanito','~')
- #item.setProperty("IsPlayable","true")
- #xbmcplugin.addDirectoryItem(handle=addon_handle,url=enlace['u'],listitem=item,isFolder=False)
- e = e + 1
- xbmcplugin.endOfDirectory(addon_handle)
- elif tarea[0]=='resolve':
- main.resolve(args)
- elif tarea[0] == 'f4mcifrado':
- main.f4mcifrado(args)
Add Comment
Please, Sign In to add comment