- iconos sin texto.
- poder elegir cliente torrent sin que se pregunte cada vez.
@@ -1,5 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?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>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.1.0"/>
|
<import addon="xbmc.python" version="2.1.0"/>
|
||||||
<import addon="script.module.libtorrent" optional="true"/>
|
<import addon="script.module.libtorrent" optional="true"/>
|
||||||
@@ -22,6 +25,3 @@
|
|||||||
<extension point="xbmc.service" library="videolibrary_service.py" start="login|startup">
|
<extension point="xbmc.service" library="videolibrary_service.py" start="login|startup">
|
||||||
</extension>
|
</extension>
|
||||||
</addon>
|
</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">
|
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ def mainlist(item):
|
|||||||
action="channel_config", folder=True,
|
action="channel_config", folder=True,
|
||||||
thumbnail=config.get_thumb("thumb_videolibrary.png")))
|
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",
|
# itemlist.append(Item(channel=CHANNELNAME, title=" Añadir o Actualizar canal/conector desde una URL",
|
||||||
# action="menu_addchannels"))
|
# action="menu_addchannels"))
|
||||||
itemlist.append(Item(channel=CHANNELNAME, action="", title="", folder=False,
|
itemlist.append(Item(channel=CHANNELNAME, action="", title="", folder=False,
|
||||||
@@ -110,6 +115,36 @@ def channel_config(item):
|
|||||||
item.config))
|
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):
|
def menu_servers(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = list()
|
itemlist = list()
|
||||||
|
|||||||
@@ -821,6 +821,23 @@ def set_player(item, xlistitem, mediaurl, view, strm):
|
|||||||
xbmc_videolibrary.mark_auto_as_watched(item)
|
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):
|
def play_torrent(item, xlistitem, mediaurl):
|
||||||
logger.info()
|
logger.info()
|
||||||
# Opciones disponibles para Reproducir torrents
|
# Opciones disponibles para Reproducir torrents
|
||||||
@@ -828,20 +845,21 @@ def play_torrent(item, xlistitem, mediaurl):
|
|||||||
torrent_options.append(["Cliente interno (necesario libtorrent)"])
|
torrent_options.append(["Cliente interno (necesario libtorrent)"])
|
||||||
torrent_options.append(["Cliente interno MCT (necesario libtorrent)"])
|
torrent_options.append(["Cliente interno MCT (necesario libtorrent)"])
|
||||||
|
|
||||||
# Plugins externos se encuentra en servers/torrent.json nodo clients
|
torrent_options.extend(torrent_client_installed(show_tuple=True))
|
||||||
from core import filetools
|
logger.debug("lista2 es %s" % torrent_options)
|
||||||
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"]])
|
|
||||||
|
|
||||||
# todo permitir elegir opción por defecto
|
torrent_client = config.get_setting("torrent_client", server="torrent")
|
||||||
if len(torrent_options) > 1:
|
|
||||||
seleccion = dialog_select("Abrir torrent con...", [opcion[0] for opcion in torrent_options])
|
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:
|
else:
|
||||||
seleccion = 0
|
if len(torrent_options) > 1:
|
||||||
|
seleccion = dialog_select("Abrir torrent con...", [opcion[0] for opcion in torrent_options])
|
||||||
|
else:
|
||||||
|
seleccion = 0
|
||||||
|
|
||||||
# Plugins externos
|
# Plugins externos
|
||||||
if seleccion > 1:
|
if seleccion > 1:
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 18 KiB |