- iconos sin texto.

- poder elegir cliente torrent sin que se pregunte cada vez.
This commit is contained in:
alfa-addon
2017-07-29 13:37:42 -04:00
parent 2abf7a53c6
commit 05b42ba9b2
39 changed files with 153 additions and 100 deletions

View File

@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.alfa" name="Alfa-Addon" version="0.0.1" provider-name="unknown">
<addon id="plugin.video.alfa"
name="Alfa"
version="0.0.1"
provider-name="unknown">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.libtorrent" optional="true"/>
@@ -22,6 +25,3 @@
<extension point="xbmc.service" library="videolibrary_service.py" start="login|startup">
</extension>
</addon>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="repository.alfa-addon" name="[COLOR red]Alfa-Addon[/COLOR] Repo" version="1.0.1" provider-name="Alfa-Addon">

0
plugin.video.alfa/channels/allcalidad.json Normal file → Executable file
View File

View File

@@ -56,6 +56,11 @@ def mainlist(item):
action="channel_config", folder=True,
thumbnail=config.get_thumb("thumb_videolibrary.png")))
if config.is_xbmc():
itemlist.append(Item(channel=CHANNELNAME, title=" Ajustes de cliente Torrent",
action="setting_torrent", folder=True,
thumbnail=config.get_thumb("thumb_channels_torrent.png")))
# itemlist.append(Item(channel=CHANNELNAME, title=" Añadir o Actualizar canal/conector desde una URL",
# action="menu_addchannels"))
itemlist.append(Item(channel=CHANNELNAME, action="", title="", folder=False,
@@ -110,6 +115,36 @@ def channel_config(item):
item.config))
def setting_torrent(item):
logger.info()
default = config.get_setting("torrent_client", server="torrent", default=0)
torrent_options = ["Preguntar", "Cliente interno", "Cliente interno - MCT"]
torrent_options.extend(platformtools.torrent_client_installed())
list_controls = [
{
"id": "list_torrent",
"type": "list",
"label": "¿Qué cliente quiere usar para reproducir torrent?",
"default": default,
"enabled": True,
"visible": True,
"lvalues": torrent_options
}
]
platformtools.show_channel_settings(list_controls=list_controls, callback='save_setting_torrent', item=item,
caption="configuración -- Torrent", custom_button={'visible': False})
def save_setting_torrent(item, dict_data_saved):
if dict_data_saved and "list_torrent" in dict_data_saved:
config.set_setting("torrent_client", dict_data_saved["list_torrent"], server="torrent")
def menu_servers(item):
logger.info()
itemlist = list()

View File

@@ -821,6 +821,23 @@ def set_player(item, xlistitem, mediaurl, view, strm):
xbmc_videolibrary.mark_auto_as_watched(item)
def torrent_client_installed(show_tuple=False):
# Plugins externos se encuentra en servers/torrent.json nodo clients
from core import filetools
from core import jsontools
torrent_clients = jsontools.get_node_from_file("torrent.json", "clients", filetools.join(config.get_runtime_path(),
"servers"))
torrent_options = []
for client in torrent_clients:
if xbmc.getCondVisibility('System.HasAddon("%s")' % client["id"]):
if show_tuple:
torrent_options.append(["Plugin externo: %s" % client["name"], client["url"]])
else:
torrent_options.append("Plugin externo: %s" % client["name"])
logger.debug("lista es %s" % torrent_options)
return torrent_options
def play_torrent(item, xlistitem, mediaurl):
logger.info()
# Opciones disponibles para Reproducir torrents
@@ -828,16 +845,17 @@ def play_torrent(item, xlistitem, mediaurl):
torrent_options.append(["Cliente interno (necesario libtorrent)"])
torrent_options.append(["Cliente interno MCT (necesario libtorrent)"])
# Plugins externos se encuentra en servers/torrent.json nodo clients
from core import filetools
from core import jsontools
torrent_clients = jsontools.get_node_from_file("torrent.json", "clients", filetools.join(config.get_runtime_path(),
"servers"))
for client in torrent_clients:
if xbmc.getCondVisibility('System.HasAddon("%s")' % client["id"]):
torrent_options.append(["Plugin externo: %s" % client["name"], client["url"]])
torrent_options.extend(torrent_client_installed(show_tuple=True))
logger.debug("lista2 es %s" % torrent_options)
# todo permitir elegir opción por defecto
torrent_client = config.get_setting("torrent_client", server="torrent")
if torrent_client and torrent_client - 1 <= len(torrent_options):
if torrent_client == 0:
seleccion = dialog_select("Abrir torrent con...", [opcion[0] for opcion in torrent_options])
else:
seleccion = torrent_client - 1
else:
if len(torrent_options) > 1:
seleccion = dialog_select("Abrir torrent con...", [opcion[0] for opcion in torrent_options])
else:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 18 KiB