diff --git a/plugin.video.alfa/channels/url.py b/plugin.video.alfa/channels/url.py index db9879dc..caf30409 100755 --- a/plugin.video.alfa/channels/url.py +++ b/plugin.video.alfa/channels/url.py @@ -1,21 +1,17 @@ # -*- coding: utf-8 -*- -from core import scrapertools -from core import servertools +from core import scrapertools, servertools from core.item import Item -from platformcode import logger +from platformcode import config, logger def mainlist(item): logger.info() itemlist = [] - itemlist.append(Item(channel=item.channel, action="search", - title="Entra aquí y teclea la URL [Enlace a servidor online/descarga]")) - itemlist.append( - Item(channel=item.channel, action="search", title="Entra aquí y teclea la URL [Enlace directo a un vídeo]")) - itemlist.append(Item(channel=item.channel, action="search", - title="Entra aquí y teclea la URL [Búsqueda de enlaces en una url]")) + itemlist.append(Item(channel=item.channel, action="search", title=config.get_localized_string(60089))) + itemlist.append(Item(channel=item.channel, action="search", title=config.get_localized_string(60090))) + itemlist.append(Item(channel=item.channel, action="search", title=config.get_localized_string(60091))) return itemlist @@ -35,8 +31,7 @@ def search(item, texto): item.channel = "url" item.action = "play" elif "directo" in item.title: - itemlist.append( - Item(channel=item.channel, action="play", url=texto, server="directo", title="Ver enlace directo")) + itemlist.append(Item(channel=item.channel, action="play", url=texto, server="directo", title=config.get_localized_string(60092))) else: data = scrapertools.downloadpage(texto) itemlist = servertools.find_video_items(data=data) @@ -45,6 +40,6 @@ def search(item, texto): item.action = "play" if len(itemlist) == 0: - itemlist.append(Item(channel=item.channel, action="search", title="No hay ningún vídeo compatible en esa URL")) + itemlist.append(Item(channel=item.channel, action="search", title=config.get_localized_string(60093))) return itemlist