- 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"/>
|
||||||
@@ -21,7 +24,4 @@
|
|||||||
</extension>
|
</extension>
|
||||||
<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 |
@@ -1,84 +1,84 @@
|
|||||||
{
|
{
|
||||||
"active": true,
|
"active": true,
|
||||||
"clients": [
|
"clients": [
|
||||||
{
|
{
|
||||||
"id": "plugin.video.xbmctorrent",
|
"id": "plugin.video.xbmctorrent",
|
||||||
"name": "xbmctorrent",
|
"name": "xbmctorrent",
|
||||||
"url": "plugin://plugin.video.xbmctorrent/play/%s"
|
"url": "plugin://plugin.video.xbmctorrent/play/%s"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "plugin.video.pulsar",
|
"id": "plugin.video.pulsar",
|
||||||
"name": "pulsar",
|
"name": "pulsar",
|
||||||
"url": "plugin://plugin.video.pulsar/play?uri=%s"
|
"url": "plugin://plugin.video.pulsar/play?uri=%s"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "plugin.video.quasar",
|
"id": "plugin.video.quasar",
|
||||||
"name": "quasar",
|
"name": "quasar",
|
||||||
"url": "plugin://plugin.video.quasar/play?uri=%s"
|
"url": "plugin://plugin.video.quasar/play?uri=%s"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "plugin.video.stream",
|
"id": "plugin.video.stream",
|
||||||
"name": "stream",
|
"name": "stream",
|
||||||
"url": "plugin://plugin.video.stream/play/%s"
|
"url": "plugin://plugin.video.stream/play/%s"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "plugin.video.torrenter",
|
"id": "plugin.video.torrenter",
|
||||||
"name": "torrenter",
|
"name": "torrenter",
|
||||||
"url": "plugin://plugin.video.torrenter/?action=playSTRM&url=%s"
|
"url": "plugin://plugin.video.torrenter/?action=playSTRM&url=%s"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "plugin.video.torrentin",
|
"id": "plugin.video.torrentin",
|
||||||
"name": "torrentin",
|
"name": "torrentin",
|
||||||
"url": "plugin://plugin.video.torrentin/?uri=%s&image="
|
"url": "plugin://plugin.video.torrentin/?uri=%s&image="
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"changes": [
|
"changes": [
|
||||||
{
|
{
|
||||||
"date": "25/03/2016",
|
"date": "25/03/2016",
|
||||||
"description": "Versión incial"
|
"description": "Versión incial"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"find_videos": {
|
"find_videos": {
|
||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"pattern": "(http:\\/\\/(?:.*?)\\.torrent)",
|
"pattern": "(http:\\/\\/(?:.*?)\\.torrent)",
|
||||||
"url": "\\1"
|
"url": "\\1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pattern": "(magnet:\\?xt=urn:[^\"]+)",
|
"pattern": "(magnet:\\?xt=urn:[^\"]+)",
|
||||||
"url": "\\1"
|
"url": "\\1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"free": true,
|
"free": true,
|
||||||
"id": "torrent",
|
"id": "torrent",
|
||||||
"name": "torrent",
|
"name": "torrent",
|
||||||
"settings": [
|
"settings": [
|
||||||
{
|
{
|
||||||
"default": false,
|
"default": false,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"id": "black_list",
|
"id": "black_list",
|
||||||
"label": "Incluir en lista negra",
|
"label": "Incluir en lista negra",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"visible": true
|
"visible": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"id": "favorites_servers_list",
|
"id": "favorites_servers_list",
|
||||||
"label": "Incluir en lista de favoritos",
|
"label": "Incluir en lista de favoritos",
|
||||||
"lvalues": [
|
"lvalues": [
|
||||||
"No",
|
"No",
|
||||||
"1",
|
"1",
|
||||||
"2",
|
"2",
|
||||||
"3",
|
"3",
|
||||||
"4",
|
"4",
|
||||||
"5"
|
"5"
|
||||||
],
|
],
|
||||||
"type": "list",
|
"type": "list",
|
||||||
"visible": false
|
"visible": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"version": 1
|
"version": 1
|
||||||
}
|
}
|
||||||