diff --git a/plugin.video.alfa/addon.xml b/plugin.video.alfa/addon.xml index 1df6997a..e6bfe4c8 100755 --- a/plugin.video.alfa/addon.xml +++ b/plugin.video.alfa/addon.xml @@ -1,5 +1,5 @@  - + @@ -19,13 +19,18 @@ [B]Estos son los cambios para esta versión:[/B] [COLOR green][B]Canales agregados y arreglos[/B][/COLOR] - [I]- newpct1 - - gnula.mobi - - divxtotal - - tvseriesdk - - maxipelis + [I]- allcalidad + - cinetux + - seriesdanko + - allpeliculas + - animeshd + - areadocumental + - cinefox + - cinefoxtv + - divxatope + - menu de acceso directo - fix internos[/I] - [COLOR green]Gracias a [COLOR yellow]paeznet[/COLOR] por su colaboración en esta versión[/COLOR] + [COLOR green]Gracias a [COLOR yellow]dan83[/COLOR] por su colaboración en esta versión[/COLOR] Navega con Kodi por páginas web para ver sus videos de manera fácil. Browse web pages using Kodi diff --git a/plugin.video.alfa/channels/allcalidad.py b/plugin.video.alfa/channels/allcalidad.py index ef3bfdef..66c77836 100755 --- a/plugin.video.alfa/channels/allcalidad.py +++ b/plugin.video.alfa/channels/allcalidad.py @@ -139,3 +139,8 @@ def findvideos(item): infoLabels={'title': item.fulltitle}, fulltitle=item.fulltitle, extra="library")) return itemlist + + +def play(item): + item.thumbnail = item.contentThumbnail + return [item] diff --git a/plugin.video.alfa/channels/allpeliculas.py b/plugin.video.alfa/channels/allpeliculas.py index 28eeacc4..089ad59f 100644 --- a/plugin.video.alfa/channels/allpeliculas.py +++ b/plugin.video.alfa/channels/allpeliculas.py @@ -271,7 +271,7 @@ def findvideos(item): idioma = IDIOMAS.get(idiomas_videos.get(language)) titulo = "%s [" + idioma + "] [" + calidad_videos.get(calidad) + "]" - itemlist.append(item.clone(action="play", title=titulo, url=url, extra=idioma)) + itemlist.append(item.clone(action="play", title=titulo, url=url, language = idioma, extra=idioma)) # Enlace Descarga patron = ' >') if next_page: @@ -171,7 +172,7 @@ def findvideos(item): url_sub = host + urllib.quote(url_sub) title = "Ver video en [[COLOR %s]%s[/COLOR]] Sub %s" % (color3, quality, label) itemlist.append(item.clone(action="play", server="directo", title=title, - url=url, subtitle=url_sub, extra=item.url, calidad=quality)) + url=url, subtitle=url_sub, extra=item.url, quality=quality, language = label)) return itemlist diff --git a/plugin.video.alfa/channels/cinefox.py b/plugin.video.alfa/channels/cinefox.py old mode 100755 new mode 100644 diff --git a/plugin.video.alfa/channels/cinefoxtv.py b/plugin.video.alfa/channels/cinefoxtv.py old mode 100755 new mode 100644 index 722144ac..a3adf5f9 --- a/plugin.video.alfa/channels/cinefoxtv.py +++ b/plugin.video.alfa/channels/cinefoxtv.py @@ -164,7 +164,7 @@ def findvideos(item): itemlist.extend(servertools.find_video_items(data=scrapedurl)) for videoitem in itemlist: - videoitem.title = item.contentTitle + ' (' + videoitem.server + ')' + videoitem.title = item.contentTitle videoitem.channel = item.channel videoitem.plot = info videoitem.action = "play" diff --git a/plugin.video.alfa/channels/cinetux.py b/plugin.video.alfa/channels/cinetux.py index 5ce4fb28..adc47772 100644 --- a/plugin.video.alfa/channels/cinetux.py +++ b/plugin.video.alfa/channels/cinetux.py @@ -307,6 +307,7 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item): patron = '(?is)#(option-[^"]+).*?png">([^<]+)' match = scrapertools.find_multiple_matches(data, patron) for scrapedoption, language in match: + scrapedserver = "" lazy = "" if "lazy" in bloque1: lazy = "lazy-" @@ -314,7 +315,9 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item): url = scrapertools.find_single_match(bloque1, patron) if "goo.gl" in url: url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "") - matches.append([url, "", "", language.strip(), t_tipo]) + if "player" in url: + scrapedserver = scrapertools.find_single_match(url, 'player/(\w+)') + matches.append([url, scrapedserver, "", language.strip(), t_tipo]) bloque2 = scrapertools.find_single_match(data, '(?s)box_links.*?dt_social_single') bloque2 = bloque2.replace("\t", "").replace("\r", "") patron = '(?s)optn" href="([^"]+)' @@ -369,7 +372,7 @@ def play(item): data = httptools.downloadpage(item.url).data scrapedurl = scrapertools.find_single_match(data, '= (5, 11, 0) else "DialogKaiToast.xml" + return super(KeyListener, cls).__new__(cls, file_name, "") + + def __init__(self): + self.key = None + + def onInit(self): + try: + self.getControl(401).addLabel("Presiona la tecla a usar para abrir la ventana") + self.getControl(402).addLabel("Tienes %s segundos" % self.TIMEOUT) + except AttributeError: + self.getControl(401).setLabel("Presiona la tecla a usar para abrir la ventana") + self.getControl(402).setLabel("Tienes %s segundos" % self.TIMEOUT) + + self.getControl(400).setImage(filetools.join(config.get_runtime_path(),"resources","images","matchcenter","matchcenter.png")) + + def onAction(self, action): + code = action.getButtonCode() + self.key = None if code == 0 else str(code) + self.close() + + @staticmethod + def record_key(): + dialog = KeyListener() + timeout = Timer(KeyListener.TIMEOUT, dialog.close) + timeout.start() + dialog.doModal() + timeout.cancel() + key = dialog.key + del dialog + return key + + +def start(): + tecla_guardada = config.get_setting("keymap_edit", "editor_keymap") + nuevakey = KeyListener().record_key() + if nuevakey and tecla_guardada != nuevakey: + from core import filetools + from platformcode import platformtools + import xbmc + file_xml = "special://profile/keymaps/alfa.xml" + data = '' % nuevakey + 'runplugin(plugin://' \ + 'plugin.video.alfa/?ew0KICAgICJhY3Rpb24iOiAic3RhcnQiLCANCiAgICAiY2hhbm5lbCI6ICJtaW5pbWVudSIsIA0KICAgICJpbmZvTGFiZWxzIjoge30NCn0=)' + filetools.write(xbmc.translatePath(file_xml), data) + platformtools.dialog_notification("Tecla guardada", "Reinicia Kodi para que se apliquen los cambios") + + from core import scrapertools + config.set_setting("keymap_edit", nuevakey, "editor_keymap") + file_idioma = filetools.join(config.get_runtime_path(), 'resources', 'language', 'Spanish', 'strings.xml') + data = filetools.read(file_idioma) + value_xml = scrapertools.find_single_match(data, '([^<]+)<') + if "tecla" in value_xml: + data = data.replace(value_xml, 'Cambiar tecla/botón para abrir la ventana (Guardada: %s)' % nuevakey) + elif "key" in value_xml: + data = data.replace(value_xml, 'Change key/button to open the window (Saved: %s)' % nuevakey) + else: + data = data.replace(value_xml, 'Cambiamento di chiave/pulsante per aprire la finestra (Salvato: %s)' % nuevakey) + filetools.write(file_idioma, data) + + return diff --git a/plugin.video.alfa/platformcode/launcher.py b/plugin.video.alfa/platformcode/launcher.py index 763a44e4..89f5a4ee 100755 --- a/plugin.video.alfa/platformcode/launcher.py +++ b/plugin.video.alfa/platformcode/launcher.py @@ -42,6 +42,9 @@ def run(item=None): logger.info(item.tostring()) try: + if item.action == "editor_keymap": + from platformcode import editor_keymap + return editor_keymap.start() # If item has no action, stops here if item.action == "": diff --git a/plugin.video.alfa/resources/language/English/strings.xml b/plugin.video.alfa/resources/language/English/strings.xml index 784ad0af..829ffb51 100755 --- a/plugin.video.alfa/resources/language/English/strings.xml +++ b/plugin.video.alfa/resources/language/English/strings.xml @@ -265,4 +265,5 @@ Cambios aplicados Buscar Actualizar canales: + Add key to open Shortcut diff --git a/plugin.video.alfa/resources/language/Spanish/strings.xml b/plugin.video.alfa/resources/language/Spanish/strings.xml index 6d28556e..17383985 100755 --- a/plugin.video.alfa/resources/language/Spanish/strings.xml +++ b/plugin.video.alfa/resources/language/Spanish/strings.xml @@ -262,5 +262,5 @@ Cambios aplicados Buscar Actualizar canales: - + Añadir tecla para el menu Shortcut diff --git a/plugin.video.alfa/resources/settings.xml b/plugin.video.alfa/resources/settings.xml old mode 100644 new mode 100755 index b5bbd959..cdf00232 --- a/plugin.video.alfa/resources/settings.xml +++ b/plugin.video.alfa/resources/settings.xml @@ -49,5 +49,8 @@ - + + + + diff --git a/plugin.video.alfa/resources/skins/Default/720p/script-shortcut-menu.xml b/plugin.video.alfa/resources/skins/Default/720p/script-shortcut-menu.xml new file mode 100755 index 00000000..21cceb48 --- /dev/null +++ b/plugin.video.alfa/resources/skins/Default/720p/script-shortcut-menu.xml @@ -0,0 +1,229 @@ + + + 0.52 + + 147 + 180 + + 32500 + + + + + + + + + + + 0 + 0 + 969 + 283 + Shorcut/dialog-bg-solid.png + + + 0 + 0 + 969 + 70 + Shorcut/white70.png + + + 70 + -30 + 0 + 969 + 70 + font20_title + + left + center + black + + + -1920 + -1080 + 5760 + 3240 + - + - + Action(close) + + + button overlay to avoid closing in dialog area + 0 + 0 + 969 + 283 + - + - + noop + + + 969 + 11 + 48 + 48 + 48 + 48 + - + - + + Conditional + Shorcut/close.png + Shorcut/logo.png + Shorcut/close.png + Shorcut/logo.png + Action(close) + 32500 + 32500 + + + + + -21 + 50 + 1011 + 253 + Shorcut/dialogbutton-nofo.png + + + -139 + 55 + 980 + 220 + 32501 + 61 + horizontal + 200 + 61 + Conditional + Conditional + + 2 + + 5 + 10 + 347 + 260 + Shorcut/button-nofo.png + + + 30 + 149 + 306 + 75 + Shorcut/black.png + + + 95 + 23 + 160 + 130 + $INFO[ListItem.Property(thumb)] + keep + center + + + 329 + 24 + 50 + 50 + keep + $INFO[ListItem.Overlay] + + + 25 + 146 + 300 + 74 + + text_shadow + font12 + center + center + + + + + 0.10 + + + + + + + 2 + + 340 + 245 + Shorcut/button-nofo.png + Unfocus + Focus + + + 340 + 237 + Shorcut/button-fo.png + Unfocus + + + 5 + 24 + 50 + 50 + keep + $INFO[ListItem.Overlay] + + + 23 + 149 + 298 + 75 + Shorcut/black.png + + + 95 + 23 + 160 + 130 + $INFO[ListItem.Property(thumb)] + keep + center + + + 25 + 146 + 300 + 74 + font12 + + center + center + + + + + + -122 + 280 + 972 + 15 + Shorcut/white.png + Shorcut/white.png + Shorcut/white.png + - + - + false + horizontal + 32500 + 32500 + 32500 + 32500 + Conditional + + + + + diff --git a/plugin.video.alfa/resources/skins/Default/media/Shorcut/button-fo.png b/plugin.video.alfa/resources/skins/Default/media/Shorcut/button-fo.png new file mode 100755 index 00000000..a161d6ef Binary files /dev/null and b/plugin.video.alfa/resources/skins/Default/media/Shorcut/button-fo.png differ diff --git a/plugin.video.alfa/resources/skins/Default/media/Shorcut/close.png b/plugin.video.alfa/resources/skins/Default/media/Shorcut/close.png new file mode 100755 index 00000000..0a144666 Binary files /dev/null and b/plugin.video.alfa/resources/skins/Default/media/Shorcut/close.png differ diff --git a/plugin.video.alfa/resources/skins/Default/media/Shorcut/dialog-bg-solid-white.png b/plugin.video.alfa/resources/skins/Default/media/Shorcut/dialog-bg-solid-white.png new file mode 100755 index 00000000..225aae63 Binary files /dev/null and b/plugin.video.alfa/resources/skins/Default/media/Shorcut/dialog-bg-solid-white.png differ diff --git a/plugin.video.alfa/resources/skins/Default/media/Shorcut/dialog-bg-solid.png b/plugin.video.alfa/resources/skins/Default/media/Shorcut/dialog-bg-solid.png new file mode 100755 index 00000000..e8c13ebd Binary files /dev/null and b/plugin.video.alfa/resources/skins/Default/media/Shorcut/dialog-bg-solid.png differ diff --git a/plugin.video.alfa/resources/skins/Default/media/Shorcut/logo.png b/plugin.video.alfa/resources/skins/Default/media/Shorcut/logo.png new file mode 100755 index 00000000..d8a680fe Binary files /dev/null and b/plugin.video.alfa/resources/skins/Default/media/Shorcut/logo.png differ diff --git a/plugin.video.alfa/resources/skins/Default/media/Shorcut/white.png b/plugin.video.alfa/resources/skins/Default/media/Shorcut/white.png new file mode 100755 index 00000000..528c66f6 Binary files /dev/null and b/plugin.video.alfa/resources/skins/Default/media/Shorcut/white.png differ diff --git a/plugin.video.alfa/resources/skins/Default/media/Shorcut/white70.png b/plugin.video.alfa/resources/skins/Default/media/Shorcut/white70.png new file mode 100755 index 00000000..d428a73a Binary files /dev/null and b/plugin.video.alfa/resources/skins/Default/media/Shorcut/white70.png differ