Merge branch 'stable' of github.com:kodiondemand/addon into stable
1
.gitignore
vendored
@@ -6,3 +6,4 @@
|
||||
custom_code.json
|
||||
last_commit.txt
|
||||
__pycache__/
|
||||
.vscode/settings.json
|
||||
|
||||
49
CONTRIBUTING.md
Normal file
@@ -0,0 +1,49 @@
|
||||
Ciao, grazie per aver preso in considerazione di contribuire a questo progetto!<br>
|
||||
Ci sono molti modi per farlo, e per alcuni di essi non è necessario essere uno sviluppatore.
|
||||
|
||||
Puoi ad esempio [segnalare i cambiamenti di struttura](#segnalare-i-cambiamenti-di-struttura) dei canali/server, [scrivere guide o registrare video-esempi](#scrivere-guide-o-registrare-video-esempi) su alcune funzionalità "avanzate", dare consigli su funzionalità nuove o per migliorare quelle già presenti.
|
||||
|
||||
# Segnalare i cambiamenti di struttura
|
||||
KoD, alla fine, non è altro che un browser che estrapola dai siti le info richieste secondo regole ben precise, basate sulla struttura dei siti.<br>
|
||||
I siti web cambiano, spesso, ciò che oggi funziona domani potrebbe non più funzionare, pertanto sono fondamentali le segnalazioni, ma esse per essere realmente utili devono:
|
||||
- contenere il file di log (lo potete generare andando in Aiuto - Segnala un problema e seguendo le istruzioni)
|
||||
- spiegare brevemente qual'è il problema e dove, ad esempio "cineblog da errore quando entro nella sezione Film", oppure "wstream non da nessun errore ma il video di fatto non parte"
|
||||
- essere replicabili, se si tratta di cose che accadono una volta ogni tanto puoi provare a segnalare lo stesso, sperando che nel log ci sia qualche indizio. Se non c'è, nada
|
||||
|
||||
Sei pregato di attenerti il più possibile a quanto descritto qua perchè un semplice "non funziona" fa solo perdere tempo.
|
||||
Puoi fare tutte le segnalazioni nella sezione [issues](https://github.com/kodiondemand/addon/issues), cliccando su "new issue" appariranno dei template che ti guideranno nel processo.
|
||||
|
||||
# Scrivere guide o registrare video-esempi
|
||||
Cerca di essere sintetico ma senza tralasciare le informazioni essenziali, una volta fatto mandalo pure sul [gruppo telegram](https://t.me/kodiondemand) taggando gli admin (@admin).<br>
|
||||
Verrà preso in considerazione il prima possibile ed eventualmente inserito nella [wiki](https://github.com/kodiondemand/addon/wiki) o verrà creato un comando richiamabile nel gruppo.
|
||||
|
||||
# Consigli
|
||||
Effettuali sempre nella sezione [issues](https://github.com/kodiondemand/addon/issues), miraccomando descrivi e fai esempi pratici.<br>
|
||||
|
||||
# Per sviluppatori
|
||||
|
||||
Di seguito tutte le info su come prendere confidenza col codice e come contribuire
|
||||
|
||||
## Da dove posso partire?
|
||||
Un buon punto di partenza è [la wiki](https://github.com/kodiondemand/addon/wiki), qui è presente un minimo di documentazione sul funzionamento di KoD.<br>
|
||||
Ti consigliamo vivamente, una volta compreso il funzionamento generale dell'addon (e prima di iniziare a sviluppare), di [forkare e clonare il repository](https://help.github.com/en/github/getting-started-with-github/fork-a-repo).<br>
|
||||
Questo perchè, oltre al fatto di poter iniziare a mandare modifiche sul tuo account github, l'utilizzo di git abilita la [dev mode](https://github.com/kodiondemand/addon/wiki/dev-mode), che ti sarà di aiuto nelle tue attività.
|
||||
|
||||
## che cosa posso fare?
|
||||
Puoi provare a fixare un bug che hai riscontrato, aggiungere un canale/server che ti interessa ecc..
|
||||
Oppure puoi guardare nella sezione [Projects](https://github.com/kodiondemand/addon/projects) cosa è previsto e iniziare a svilupparlo!
|
||||
|
||||
## ho fatto le modifiche che volevo, e ora?
|
||||
Pusha sul tuo fork le modifiche che hai fatto e manda una pull request. Se è la prima volta ecco qualche link che ti aiuterà:
|
||||
- http://makeapullrequest.com/
|
||||
- http://www.firsttimersonly.com/
|
||||
- [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
|
||||
|
||||
Quando crei la pull request, ricordati di spiegare brevemente qual'è la modifica e perchè l'hai fatta.
|
||||
Quando avremo tempo revisioneremo le modifiche, potremmo anche segnalarti alcuni problemi, nel caso prenditi pure il tutto il tempo che vuoi per sistemare (non è necessaria un'altra pull, tutti i commit verranno riportati nella prima).<br>
|
||||
Quando sarà tutto a posto accetteremo la pull includendo le modifiche
|
||||
|
||||
## Regole per le collaborazioni:
|
||||
- Se si riutilizza codice proveniente da altri addon è necessario citarne la fonte, per rispetto di chi ci ha lavorato, in caso contrario il pull request verrà respinto.
|
||||
- Ogni modifica o novità inviata dev'essere testata, può capitare che vi sia sfuggito qualche bug (è normale), ma l'invio di materiale senza preventivi controlli non è gradito.
|
||||
- I nuovi canali devono essere funzionanti e completi di tutte le feature, comprese videoteca ed autoplay, non verranno accettati finchè non lo saranno.
|
||||
25
README.md
@@ -1,25 +1,16 @@
|
||||
# Kodi On Demand
|
||||
### Un fork italiano di [Alfa](https://github.com/alfa-addon)
|
||||
Ognuno è libero (anzi, invitato!) a collaborare, per farlo è possibile utilizzare i pull request.
|
||||
KOD funziona con Kodi fino alla versione 18 (Python 2).
|
||||
|
||||
KOD, come Alfa, è sotto licenza GPL v3, pertanto siete liberi di utilizzare parte del codice, a patto di rispettare i termini di suddetta licenza, che si possono riassumere in:
|
||||
Installazione: https://kodiondemand.github.io/#download
|
||||
|
||||
KoD attualmente funziona con Kodi fino alla versione 18 (Python 2).
|
||||
|
||||
|
||||
KoD, come Alfa, è sotto licenza GPL v3, pertanto siete liberi di utilizzare parte del codice, a patto di rispettare i termini di suddetta licenza, che si possono riassumere in:
|
||||
|
||||
- Il tuo addon deve essere rilasciando secondo la stessa licenza, ovvero essere open source (il fatto che lo zip sia visibile da chiunque non ha importanza, è necessario avere un repository git come questo)
|
||||
- Aggiungere i crediti a tutto ciò che copiate/modificate, ad esempio aggiungendo un commento nel file in questione o, meglio, facendo un cherry-pick (in modo da preservarnee lo storico)
|
||||
|
||||
### Come contribuire?
|
||||
- Fai un Fork del repository.
|
||||
- Effettua tutte le modifiche e fai un push nel tuo repository remoto.
|
||||
- Testa tutte le funzioni principali (videoteca, autoplay, scraper web) o eventuali aggiunte extra.
|
||||
- Apri una pull request.
|
||||
|
||||
Regole per le collaborazioni:
|
||||
- Se si riutilizza codice proveniente da altri addon è necessario citarne la fonte, per rispetto di chi ci ha lavorato, in caso contrario il pull request verrà respinto.
|
||||
- Ogni modifica o novità inviata dev'essere testata, può capitare che vi sia sfuggito qualche bug (è normale), ma l'invio di materiale senza preventivi controlli non è gradito.
|
||||
- I nuovi canali devono essere funzionanti e completi di tutte le feature, comprese videoteca ed autoplay, non verranno accettati finchè non lo saranno.
|
||||
|
||||
Se parte del codice di un tuo addon è stato incluso in questo progetto e ne desideri l'eliminazione, crea una issue portando le prove di essere veramente uno dei dev e lo elimineremo.
|
||||
|
||||
### Qualcosa non funziona?
|
||||
Sentiti libero di segnalarlo al team [qui](https://github.com/kodiondemand/addon/issues)
|
||||
### Come contribuire o fare segnalazioni?
|
||||
Ti piace il progetto e vuoi dare una mano? Leggi [qui](https://github.com/kodiondemand/addon/blob/master/CONTRIBUTING.md)
|
||||
|
||||
18
addon.xml
@@ -1,6 +1,5 @@
|
||||
<addon id="plugin.video.kod" name="Kodi on Demand" provider-name="KOD Team" version="0.8.1">
|
||||
<addon id="plugin.video.kod" name="Kodi on Demand" provider-name="KoD Team" version="0.9">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.1.0"/>
|
||||
<import addon="script.module.libtorrent" optional="true"/>
|
||||
<import addon="metadata.themoviedb.org"/>
|
||||
<import addon="metadata.tvdb.com"/>
|
||||
@@ -19,11 +18,14 @@
|
||||
<screenshot>resources/media/themes/ss/2.png</screenshot>
|
||||
<screenshot>resources/media/themes/ss/3.png</screenshot>
|
||||
</assets>
|
||||
<news>- riorganizzate le impostazioni
|
||||
- aggiunte descrizioni tag qualità su cb01 (presto anche sugli altri)
|
||||
- aggiunto il supporto alle serie di polpotv
|
||||
- fixato server mystream
|
||||
- fix Rinumerazione per episodi Nuovi</news>
|
||||
<news>- Nuova sezione Musica
|
||||
- Download in Background
|
||||
- Download dalla Videoteca e supporto file locali
|
||||
- Backup e cancellazione della Videoteca
|
||||
- Spostamento della Videoteca
|
||||
- Migliorata integrazione con libreria di Kodi
|
||||
- Gestione delle Viste Preferite
|
||||
- Nuovo layout impostazioni</news>
|
||||
<description lang="it">Naviga velocemente sul web e guarda i contenuti presenti</description>
|
||||
<disclaimer>[COLOR red]The owners and submitters to this addon do not host or distribute any of the content displayed by these addons nor do they have any affiliation with the content providers.[/COLOR]
|
||||
[COLOR yellow]Kodi © is a registered trademark of the XBMC Foundation. We are not connected to or in any other way affiliated with Kodi, Team Kodi, or the XBMC Foundation. Furthermore, any software, addons, or products offered by us will receive no support in official Kodi channels, including the Kodi forums and various social networks.[/COLOR]</disclaimer>
|
||||
@@ -33,6 +35,6 @@
|
||||
<forum>https://t.me/kodiondemand</forum>
|
||||
<source>https://github.com/kodiondemand/addon</source>
|
||||
</extension>
|
||||
<extension library="videolibrary_service.py" point="xbmc.service" start="login|startup">
|
||||
<extension library="service.py" point="xbmc.service" start="login|startup">
|
||||
</extension>
|
||||
</addon>
|
||||
@@ -12,7 +12,7 @@
|
||||
"animeworld": "https://www.animeworld.tv",
|
||||
"casacinema": "https://www.casacinema.me",
|
||||
"casacinemaInfo": "https://casacinema.life",
|
||||
"cineblog01": "https://cb01.expert",
|
||||
"cineblog01": "https://cb01.uno",
|
||||
"cb01anime": "https://www.cineblog01.network",
|
||||
"cinemalibero": "https://www.cinemalibero.plus",
|
||||
"cinetecadibologna": "http://cinestore.cinetecadibologna.it",
|
||||
|
||||
@@ -62,36 +62,6 @@ def menu(item):
|
||||
return locals()
|
||||
|
||||
|
||||
# @support.scrape
|
||||
# def newest(categoria):
|
||||
#
|
||||
# # debug = True
|
||||
# patron = r'<a href="?(?P<url>[^">]+)"?>(?P<title>[^<([]+)(?:\[(?P<lang>Sub-ITA|B/N|SUB-ITA)\])?\s*(?:\[(?P<quality>HD|SD|HD/3D)\])?\s*\((?P<year>[0-9]{4})\)<\/a>'
|
||||
|
||||
# if type(categoria) != Item:
|
||||
# item = Item()
|
||||
# else:
|
||||
# item = categoria
|
||||
# categoria = 'series' if item.contentType != 'movie' else 'movie'
|
||||
# pagination = 20
|
||||
|
||||
# if categoria == 'series':
|
||||
# item.contentType = 'tvshow'
|
||||
# action = 'episodios'
|
||||
# item.url = host + 'serietv/aggiornamento-quotidiano-serie-tv/'
|
||||
# patronBlock = r'<article class="sequex-post-content">(?P<block>.*?)</article>'
|
||||
# patron = '<a href="(?P<url>[^"]+)".*?>(?P<title>[^<([|]+).*?(?P<lang>ITA|SUB-ITA)?</a'
|
||||
# else:
|
||||
# item.contentType = 'movie'
|
||||
# item.url = host + '/lista-film-ultimi-100-film-aggiunti/'
|
||||
# patronBlock = r'Ultimi 100 film aggiunti:(?P<block>.*?)<\/td>'
|
||||
# # else:
|
||||
# # patronBlock = r'Ultimi 100 film Aggiornati:(?P<block>.*?)<\/td>'
|
||||
# # item = categoria
|
||||
|
||||
# return locals()
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
|
||||
@@ -135,7 +105,7 @@ def peliculas(item):
|
||||
'Aggiornamento Quotidiano Serie TV', 'OSCAR 2019 ▶ CB01.UNO: Vota il tuo film preferito! 🎬',
|
||||
'Openload: la situazione. Benvenuto Verystream', 'Openload: lo volete ancora?',
|
||||
'OSCAR 2020 ▶ VOTA IL TUO FILM PREFERITO! 🎬']
|
||||
# debug = True
|
||||
|
||||
if 'newest' in item.args:
|
||||
if '/serietv/' not in item.url:
|
||||
pagination = ''
|
||||
@@ -146,19 +116,16 @@ def peliculas(item):
|
||||
patronBlock = r'Ultime SerieTv aggiornate(?P<block>.*?)Lista'
|
||||
patron = r'src="(?P<thumb>[^"]+)" alt="(?P<title>.*?)(?: – \d+×\d+)?(?:"| – )(?:(?P<lang>Sub-ITA|ITA))?[^>]*>[^>]+>[^>]+><a href="(?P<url>[^"]+)".*?<div class="rpwe-summary">.*?\((?P<year>\d{4})[^\)]*\) (?P<plot>[^<]+)<'
|
||||
action = 'episodios'
|
||||
|
||||
elif '/serietv/' not in item.url:
|
||||
patron = r'<div class="card-image">\s<a[^>]+>\s*<img src="(?P<thumb>[^" ]+)" alt[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="?(?P<url>[^" >]+)(?:\/|"|\s+)>(?P<title>[^<[(]+)(?:\[(?P<quality>[A-Za-z0-9/-]+)])? (?:\((?P<year>[0-9]{4})\))?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<genre>[^<>&âÂÂ]+)(?:[^ ]+\s*DURATA\s*(?P<duration>[0-9]+)[^>]+>[^>]+>[^>]+>(?P<plot>[^<>]+))?'
|
||||
# patron = r'<div class="?card-image"?>.*?<img src="?(?P<thumb>[^" ]+)"? alt.*?<a href="?(?P<url>[^" >]+)(?:\/|"|\s+)>(?P<title>[^<[(]+)(?:\[(?P<quality>[A-Za-z0-9/-]+)])? (?:\((?P<year>[0-9]{4})\))?.*?<strong>(?P<genre>[^<>&–]+).*?DURATA (?P<duration>[0-9]+).*?<br(?: /)?>(?P<plot>[^<>]+)'
|
||||
action = 'findvideos'
|
||||
|
||||
else:
|
||||
# debug = True
|
||||
patron = r'div class="card-image">.*?<img src="(?P<thumb>[^ ]+)" alt.*?<a href="(?P<url>[^ >]+)">(?P<title>.*?)(?: – (?:[SS]tagione \d|\d).*?)?(?P<lang>(?:[Ss][Uu][Bb]-)?[Ii][Tt][Aa])?<\/a>.*?(?:<strong><span style="[^"]+">(?P<genre>[^<>0-9(]+)\((?P<year>[0-9]{4}).*?</(?:p|div)>(?P<plot>.*?))?</div'
|
||||
patron = r'div class="card-image">.*?<img src="(?P<thumb>[^ ]+)" alt.*?<a href="(?P<url>[^ >]+)">(?P<title>.*?)(?: –\s*(?:[SS]tagione \d|\d).*?)?(?P<lang>(?:[Ss][Uu][Bb]-)?[Ii][Tt][Aa])?<\/a>.*?(?:<strong><span style="[^"]+">(?P<genre>[^<>0-9(]+)\((?P<year>[0-9]{4}).*?</(?:p|div)>(?P<plot>.*?))?</div'
|
||||
action = 'episodios'
|
||||
item.contentType = 'tvshow'
|
||||
|
||||
# patronBlock=[r'<div class="?sequex-page-left"?>(?P<block>.*?)<aside class="?sequex-page-right"?>',
|
||||
# '<div class="?card-image"?>.*?(?=<div class="?card-image"?>|<div class="?rating"?>)']
|
||||
# if 'newest' not in item.args:
|
||||
patronNext = '<a class="?page-link"? href="?([^>]+)"?><i class="fa fa-angle-right">'
|
||||
|
||||
return locals()
|
||||
@@ -167,7 +134,6 @@ def peliculas(item):
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
patronBlock = r'(?P<block><div class="sp-head[a-z ]*?" title="Espandi">\s*(?:STAGION[EI]\s*(?:DA\s*[0-9]+\s*A)?\s*[0-9]+|MINISERIE) - (?P<lang>[^-<]+)(?:- (?P<quality>[^-<]+))?.*?[^<>]*?<\/div>.*?)<div class="spdiv">\[riduci\]<\/div>'
|
||||
# patron = '(?:<p>|<strong>)(?P<episode>[0-9]+(?:×|×)[0-9]+)\s*(?P<title2>[^&<]*)?(?:–|-)?\s*(?P<url>.*?)(?:<\/p>|<br)'
|
||||
patron = r'(?:/>|<p>|<strong>)(?P<url>.*?(?P<episode>[0-9]+(?:×|ÃÂ)[0-9]+)\s*(?P<title2>.*?)?(?:\s*–|\s*-|\s*<).*?)(?:<\/p>|<br)'
|
||||
def itemlistHook(itemlist):
|
||||
title_dict = {}
|
||||
@@ -254,15 +220,15 @@ def findvid_serie(item):
|
||||
matches = support.match(html, patron=r'<a href="([^"]+)"[^=]+="_blank"[^>]+>(?!<!--)(.*?)(?:</a>|<img)').matches
|
||||
for url, server in matches:
|
||||
item = Item(channel=item.channel,
|
||||
action="play",
|
||||
title=server,
|
||||
url=url,
|
||||
server=server,
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show,
|
||||
quality=blktxt,
|
||||
contentType=item.contentType,
|
||||
folder=False)
|
||||
action="play",
|
||||
title=server,
|
||||
url=url,
|
||||
server=server,
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show,
|
||||
quality=blktxt,
|
||||
contentType=item.contentType,
|
||||
folder=False)
|
||||
if 'swzz' in item.url: item.url = support.swzz_get_url(item)
|
||||
itemlist.append(item)
|
||||
|
||||
|
||||
@@ -12,18 +12,19 @@ from platformcode import config
|
||||
list_servers = ['akstream', 'wstream', 'backin', 'clipwatching', 'cloudvideo', 'verystream', 'onlystream', 'mixdrop']
|
||||
list_quality = ['default']
|
||||
|
||||
def findhost():
|
||||
permUrl = httptools.downloadpage('https://www.cinemalibero.online/', follow_redirects=False).headers
|
||||
try:
|
||||
import urlparse
|
||||
except:
|
||||
import urllib.parse as urlparse
|
||||
p = list(urlparse.urlparse(permUrl['location'].replace('https://www.google.com/search?q=site:', '')))
|
||||
if not p[0]:
|
||||
p[0] = 'https'
|
||||
return urlparse.urlunparse(p)
|
||||
# rimanda a .today che contiene tutti link a .plus
|
||||
# def findhost():
|
||||
# permUrl = httptools.downloadpage('https://www.cinemalibero.online/', follow_redirects=False).headers
|
||||
# try:
|
||||
# import urlparse
|
||||
# except:
|
||||
# import urllib.parse as urlparse
|
||||
# p = list(urlparse.urlparse(permUrl['location'].replace('https://www.google.com/search?q=site:', '')))
|
||||
# if not p[0]:
|
||||
# p[0] = 'https'
|
||||
# return urlparse.urlunparse(p)
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Ringraziamo Icarus crew
|
||||
# Canale per cinetecadibologna
|
||||
# ------------------------------------------------------------
|
||||
from core.item import Item
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Ringraziamo Icarus crew
|
||||
# Canale per documentaristreamingda
|
||||
# ------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ from core import scrapertools, httptools, support
|
||||
from core.item import Item
|
||||
|
||||
def findhost():
|
||||
permUrl = httptools.downloadpage('https://eurostreaming.link/', follow_redirects=False).headers
|
||||
permUrl = httptools.downloadpage('https://eurostreaming.link/', follow_redirects=False, only_headers=True).headers
|
||||
host = 'https://'+permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
||||
return host
|
||||
|
||||
|
||||
@@ -155,9 +155,6 @@ def newest(categoria):
|
||||
def findvideos(item):
|
||||
if item.contentType == 'movie':
|
||||
data = httptools.downloadpage(item.url).data
|
||||
toUnshorten = scrapertools.find_multiple_matches(data, 'https?://buckler.link/[a-zA-Z0-9]+')
|
||||
for link in toUnshorten:
|
||||
data += '\n' + httptools.downloadpage(link, follow_redirects=False).headers["Location"]
|
||||
return support.server(item, data=data)
|
||||
else:
|
||||
return support.server(item, item.url)
|
||||
|
||||
12
channels/hd4me.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "hd4me",
|
||||
"name": "HD4ME",
|
||||
"language": ["ita", "sub-ita"],
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"thumbnail": "hd4me.png",
|
||||
"banner": "hd4me.png",
|
||||
"categories": ["movie", "vos"],
|
||||
"not_active": ["include_in_newest"],
|
||||
"settings": []
|
||||
}
|
||||
53
channels/hd4me.py
Normal file
@@ -0,0 +1,53 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per HD4ME
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import httptools, support
|
||||
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['mega']
|
||||
list_quality = ['default']
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = [('Genere', ['', 'genre'])]
|
||||
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
# debug = True
|
||||
patron = r'<a href="(?P<url>[^"]+)" rel="[^"]+" title="(?P<title>[^\(]+)(?!\()\s*\((?P<year>\d+)\)\s\D+(?P<quality>\d+p) ... (?P<lang>[^ ]+).*?<img id="cov" src="(?P<thumb>[^"]+)"'
|
||||
patronNext = r'rel="next" href="([^"]+)"'
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def genre(item):
|
||||
action = 'peliculas'
|
||||
blacklist =['prova ']
|
||||
patronMenu = r'<a href="(?P<url>[^"]+)" class="menu-link\s*sub-menu-link">(?P<title>[^<]+)<'
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
item.url = host + '/?s=' + text
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Cattura la eccezione così non interrompe la ricerca globle se il canale si rompe!
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("search except: %s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
url = support.match(item, patron=r'<a class="bot1" href="([^"]+)"').match
|
||||
url = support.httptools.downloadpage(url, followredirect=True).url
|
||||
return support.server(item, url)
|
||||
12
channels/metalvideo.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "metalvideo",
|
||||
"name": "Metal Video",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["*"],
|
||||
"thumbnail": "metalvideo.png",
|
||||
"banner": "metalvideo.png",
|
||||
"categories": ["music"],
|
||||
"not_active":["include_in_global_search"],
|
||||
"settings" :[]
|
||||
}
|
||||
63
channels/metalvideo.py
Normal file
@@ -0,0 +1,63 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per altadefinizione01
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
from xml.dom import minidom
|
||||
|
||||
#impostati dinamicamente da findhost()
|
||||
|
||||
|
||||
host = 'https://metalvideo.com'
|
||||
headers={'X-Requested-With': 'XMLHttpRequest'}
|
||||
|
||||
list_servers = ['youtube']
|
||||
list_quality = ['default']
|
||||
|
||||
@support.scrape
|
||||
def mainlist(item):
|
||||
item.url = host
|
||||
action = 'peliculas'
|
||||
patronBlock = r'<ul class="dropdown-menu(?P<block>.*?)</ul> </div'
|
||||
patron = r'<a href="(?P<url>[^"]+)"(?: class="")?>(?P<title>[^<]+)<'
|
||||
def itemHook(item):
|
||||
item.thumbnail = support.thumb(thumb='music.png')
|
||||
return item
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.pop(0)
|
||||
itemlist.append(
|
||||
support.Item(
|
||||
channel=item.channel,
|
||||
title=support.typo('Cerca...', 'bold color kod'),
|
||||
url = item.url,
|
||||
action='search',
|
||||
thumbnail=support.thumb(thumb='search.png')))
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
action = 'findvideos'
|
||||
patron= r'<img src="[^"]+" alt="(?P<title>[^"]+)" data-echo="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)"'
|
||||
patronNext = r'<a href="([^"]+)">»'
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
return support.server(item, video_library=False)
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
url = host + '/search.php?keywords=' + text + '&video-id='
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
@@ -2,9 +2,9 @@
|
||||
# ------------------------------------------------------------
|
||||
# KoD - XBMC Plugin
|
||||
# Canale polpotv
|
||||
# ------------------------------------------------------------
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import scrapertools, httptools, support, jsontools
|
||||
from core import support, jsontools
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
import json, datetime
|
||||
@@ -42,15 +42,15 @@ def newest(categoria):
|
||||
item.contentType = 'movie'
|
||||
item.url = host + '/api/movies'
|
||||
elif categoria == 'series':
|
||||
item.contentType = 'tvshow'
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host+'/api/shows'
|
||||
return peliculas(item)
|
||||
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for element in json_object['hydra:member']:
|
||||
if 'shows' not in item.url:
|
||||
@@ -70,30 +70,37 @@ def peliculas(item):
|
||||
def episodios(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for season in json_object['seasons']:
|
||||
seas_url=host+season['@id']+'/releases'
|
||||
itemlist_season=get_season(item.channel, seas_url, season['seasonNumber'])
|
||||
itemlist_season=get_season(item, seas_url, season['seasonNumber'])
|
||||
if(len(itemlist_season)>0):
|
||||
itemlist.extend(itemlist_season)
|
||||
|
||||
support.videolibrary(itemlist, item, 'color kod bold')
|
||||
support.download(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
def get_season(channel, seas_url, seasonNumber):
|
||||
def get_season(item, seas_url, seasonNumber):
|
||||
support.log()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(seas_url, headers=headers).data
|
||||
data = support.match(seas_url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for episode in json_object['hydra:member']:
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
Item(channel=item.channel,
|
||||
action='findvideos',
|
||||
contentType='episode',
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show,
|
||||
contentSerieName=item.contentSerieName,
|
||||
title=str(seasonNumber)+"x"+str("%02d"%episode['episodeNumber']),
|
||||
url=seas_url,
|
||||
thumbnail=item.thumbnail,
|
||||
fanart=item.fanart,
|
||||
plot=item.plot,
|
||||
extra=str(len(json_object['hydra:member'])-episode['episodeNumber'])))
|
||||
return itemlist[::-1]
|
||||
|
||||
@@ -102,17 +109,17 @@ def search(item, texto):
|
||||
itemlist=[]
|
||||
try:
|
||||
item.url = host + "/api/movies?originalTitle="+texto+"&translations.name=" +texto
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for movie in json_object['hydra:member']:
|
||||
item.contentType='movie'
|
||||
itemlist.extend(get_itemlist_element(movie,item))
|
||||
item.url = host + "/api/shows?originalTitle="+texto+"&translations.name=" +texto
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for tvshow in json_object['hydra:member']:
|
||||
item.contentType='tvshow'
|
||||
itemlist.extend(get_itemlist_element(tvshow,item))
|
||||
itemlist.extend(get_itemlist_element(tvshow,item))
|
||||
return itemlist
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
@@ -124,7 +131,7 @@ def search(item, texto):
|
||||
def search_movie_by_genre(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for genre in json_object['hydra:member']:
|
||||
itemlist.append(
|
||||
@@ -155,7 +162,7 @@ def findvideos(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
try:
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
array_index=0
|
||||
if item.contentType!='movie':
|
||||
@@ -165,7 +172,10 @@ def findvideos(item):
|
||||
Item(
|
||||
channel=item.channel,
|
||||
action="play",
|
||||
title='Direct',
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle = item.fulltitle,
|
||||
search = item.search,
|
||||
url=video['src'],
|
||||
server='directo',
|
||||
quality=str(video['size'])+ 'p',
|
||||
@@ -204,7 +214,7 @@ def get_itemlist_element(element,item):
|
||||
next_action='findvideos'
|
||||
quality=support.typo(element['lastQuality'].upper(), '_ [] color kod bold')
|
||||
url="%s%s/releases"
|
||||
infoLabels['tmdbid']=element['tmdbId']
|
||||
infoLabels['tmdb_id']=element['tmdbId']
|
||||
else:
|
||||
next_action='episodios'
|
||||
quality=''
|
||||
@@ -223,4 +233,8 @@ def get_itemlist_element(element,item):
|
||||
url=url %(host,element['@id'] ),
|
||||
infoLabels=infoLabels,
|
||||
extra=item.extra))
|
||||
|
||||
if item.contentType=='movie':
|
||||
for item in itemlist:
|
||||
item= support.tmdb.find_and_set_infoLabels(item)
|
||||
return itemlist
|
||||
|
||||
@@ -44,42 +44,42 @@ def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
itemlist.append(Item(channel=__channel__, action="videos", title="Más Calientes", url=host,
|
||||
viewmode="movie", thumbnail=get_thumb("channels_adult.png")))
|
||||
viewmode="movie", thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Nuevas", url=host + '/newest',
|
||||
action="videos", viewmode="movie_with_plot", viewcontent='movies',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Tendencias", url=host + '/tending',
|
||||
action="videos", viewmode="movie_with_plot", viewcontent='movies',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Mejores Videos", url=host + '/top',
|
||||
action="videos", viewmode="movie_with_plot", viewcontent='movies',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Populares", url=host + '/popular',
|
||||
action="videos", viewmode="movie_with_plot", viewcontent='movies',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Videos en HD", url=host + '/hd',
|
||||
action="videos", viewmode="movie_with_plot", viewcontent='movies',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Caseros", url=host + '/hd',
|
||||
action="videos", viewmode="movie_with_plot", viewcontent='homemade',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="PornStar", action="catalogo",
|
||||
url=host + '/pornstars/', viewmode="movie_with_plot", viewcontent='movies',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Categorías", action="categorias",
|
||||
url=host + '/categories/', viewmode="movie_with_plot", viewcontent='movies',
|
||||
thumbnail=get_thumb("channels_adult.png")))
|
||||
thumbnail=get_thumb("adult.png")))
|
||||
|
||||
itemlist.append(Item(channel=__channel__, title="Buscador", action="search", url=host,
|
||||
thumbnail=get_thumb("channels_adult.png"), extra="buscar"))
|
||||
thumbnail=get_thumb("adult.png"), extra="buscar"))
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -58,7 +58,6 @@ def learning(item):
|
||||
itemlist =[]
|
||||
json = current_session.get(item.url).json()['contents']
|
||||
for key in json:
|
||||
support.log(key['name'])
|
||||
itemlist.append(support.Item(channel = item.channel, title = support.typo(key['name'],'bold'), fulltitle = key['name'], show = key['name'],
|
||||
url = key['contents'], thumbnail = item.thumbnail, action = 'peliculas', args = item.args))
|
||||
return itemlist
|
||||
@@ -117,7 +116,6 @@ def replay(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
json = current_session.get(item.url).json()[item.fulltitle][0]['palinsesto'][0]['programmi']
|
||||
# support.log(json)
|
||||
for key in json:
|
||||
support.log('KEY=',key)
|
||||
if key and key['pathID']: itemlist.append(support.Item(channel = item.channel, thumbnail = getUrl(key['images']['landscape']), fanart = getUrl(key['images']['landscape']), url = getUrl(key['pathID']),
|
||||
@@ -165,13 +163,13 @@ def dirette(item):
|
||||
onAir = current_session.get(onair).json()['on_air']
|
||||
for i, key in enumerate(json):
|
||||
itemlist.append(support.Item(channel = item.channel, title = support.typo(key['channel'], 'bold'), fulltitle = key['channel'], show = key['channel'],
|
||||
thumbnail = key['transparent-icon'].replace("[RESOLUTION]", "256x-"), fanart = getUrl(onAir[i]['currentItem']['image']), url = key['video']['contentUrl'],
|
||||
thumbnail = key['transparent-icon'].replace("[RESOLUTION]", "256x-"),forcethumb=True , fanart = getUrl(onAir[i]['currentItem']['image']), url = key['video']['contentUrl'],
|
||||
plot = support.typo(onAir[i]['currentItem']['name'],'bold')+ '\n\n' + onAir[i]['currentItem']['description'], action = 'play'))
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
support.log(item.url)
|
||||
support.log()
|
||||
itemlist = []
|
||||
keys = []
|
||||
key_list = []
|
||||
@@ -235,7 +233,7 @@ def select(item):
|
||||
|
||||
|
||||
def episodios(item):
|
||||
support.log(len(item.url))
|
||||
support.log()
|
||||
itemlist = []
|
||||
if type(item.url) in [list, dict] and len(item.url) > 1 and ('name' in item.url[0] and 'stagione' not in item.url[0]['name'].lower()):
|
||||
for key in item.url:
|
||||
|
||||
@@ -108,39 +108,28 @@ def newest(categoria):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
log()
|
||||
log(item)
|
||||
if item.args != 'update':
|
||||
data = item.url
|
||||
toUnshorten = scrapertools.find_multiple_matches(data, 'https?://buckler.link/[a-zA-Z0-9]+')
|
||||
for link in toUnshorten:
|
||||
data += '\n' + httptools.downloadpage(link, follow_redirects=False).headers["Location"]
|
||||
return support.server(item, data=data)
|
||||
return support.server(item, data=item.url)
|
||||
else:
|
||||
itemlist = []
|
||||
item.infoLabels['mediatype'] = 'episode'
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = re.sub('\n|\t', ' ', data)
|
||||
data = re.sub(r'>\s+<', '> <', data)
|
||||
url_video = scrapertools.find_single_match(data, r'<div class="item"> <a data-id="[^"]+" data-href="([^"]+)" data-original="[^"]+"[^>]+> <div> <div class="title">Episodio \d+', -1)
|
||||
url_serie = scrapertools.find_single_match(data, r'<link rel="canonical" href="([^"]+)"\s?/>')
|
||||
goseries = support.typo(">> Vai alla Serie:", ' bold')
|
||||
series = support.typo(item.contentSerieName, ' bold color kod')
|
||||
data = support.match(item).data
|
||||
urls_video = support.match(data, patron=r'<a data-id="[^"]+" data-(href=".*?)</iframe>').matches[-1]
|
||||
url_serie = support.match(data, patron=r'<link rel="canonical" href="([^"]+)"\s?/>').match
|
||||
|
||||
itemlist = support.server(item, data=url_video)
|
||||
itemlist = support.server(item, data=urls_video)
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title=goseries + series,
|
||||
title=support.typo("Vai alla Serie Completa: " + item.fulltitle, ' bold'),
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show,
|
||||
contentType='tvshow',
|
||||
contentSerieName=item.contentSerieName,
|
||||
url=url_serie,
|
||||
action='episodios',
|
||||
contentTitle=item.contentSerieName,
|
||||
plot = goseries + series + "con tutte le puntate",
|
||||
thumbnail = support.thumb(thumb='channels_tvshow.png')
|
||||
thumbnail = support.thumb(thumb='tvshow.png')
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -12,7 +12,7 @@ list_servers = ['verystream', 'openload', 'wstream']
|
||||
list_quality = ['1080p', 'HD', 'DVDRIP', 'SD', 'CAM']
|
||||
|
||||
def findhost():
|
||||
permUrl = httptools.downloadpage('https://www.popcornstream.info', follow_redirects=False).headers
|
||||
permUrl = httptools.downloadpage('https://www.popcornstream.info', follow_redirects=False, only_headers=True).headers
|
||||
if 'google' in permUrl['location']:
|
||||
host = permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
||||
if host[:4] != 'http':
|
||||
|
||||
12
channels/tunein.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "tunein",
|
||||
"name": "TuneIn",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["*"],
|
||||
"thumbnail": "tunein.png",
|
||||
"banner": "tunein.png",
|
||||
"categories": ["music"],
|
||||
"not_active":["include_in_global_search"],
|
||||
"settings" :[]
|
||||
}
|
||||
109
channels/tunein.py
Normal file
@@ -0,0 +1,109 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per altadefinizione01
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
from xml.dom import minidom
|
||||
|
||||
#impostati dinamicamente da findhost()
|
||||
|
||||
|
||||
host = 'http://api.radiotime.com'
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@support.scrape
|
||||
def mainlist(item):
|
||||
item.url = host
|
||||
action = 'radio'
|
||||
patron = r'text="(?P<title>[^"]+)" URL="(?P<url>[^"]+)"'
|
||||
def itemHook(item):
|
||||
item.thumbnail = support.thumb(thumb='music.png')
|
||||
return item
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.append(
|
||||
support.Item(
|
||||
channel=item.channel,
|
||||
title=support.typo('Cerca...', 'bold color kod'),
|
||||
url = item.url,
|
||||
action='search',
|
||||
thumbnail=support.thumb(thumb='search.png')))
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
|
||||
def radio(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
data = support.match(item, patron= r'text="(?P<title>[^\("]+)(?:\((?P<location>[^\)]+)\))?" URL="(?P<url>[^"]+)" bitrate="(?P<quality>[^"]+)" reliability="[^"]+" guide_id="[^"]+" subtext="(?P<song>[^"]+)" genre_id="[^"]+" formats="(?P<type>[^"]+)" (?:playing="[^"]+" )?(?:playing_image="[^"]+" )?(?:show_id="[^"]+" )?(?:item="[^"]+" )?image="(?P<thumb>[^"]+)"')
|
||||
if data.matches:
|
||||
for title, location, url, quality, song, type, thumbnail in data.matches:
|
||||
itemlist.append(
|
||||
support.Item(
|
||||
channel = item.channel,
|
||||
title = support.typo(title, 'bold') + support.typo(quality + ' kbps','_ [] bold color kod'),
|
||||
thumbnail = thumbnail,
|
||||
url = url,
|
||||
contentType = 'music',
|
||||
plot = support.typo(location, 'bold') + '\n' + song,
|
||||
action = 'findvideos'
|
||||
)
|
||||
)
|
||||
else:
|
||||
matches = support.match(data.data, patron= r'text="(?P<title>[^\("]+)(?:\([^\)]+\))?" URL="(?P<url>[^"]+)" (?:guide_id="[^"]+" )?(?:stream_type="[^"]+" )?topic_duration="(?P<duration>[^"]+)" subtext="(?P<plot>[^"]+)" item="[^"]+" image="(?P<thumb>[^"]+)"').matches
|
||||
if matches:
|
||||
for title, url, duration, plot, thumbnail in matches:
|
||||
infoLabels={}
|
||||
infoLabels['duration'] = duration
|
||||
itemlist.append(
|
||||
support.Item(
|
||||
channel = item.channel,
|
||||
title = support.typo(title, 'bold'),
|
||||
thumbnail = thumbnail,
|
||||
infolLbels = infoLabels,
|
||||
url = url,
|
||||
contentType = 'music',
|
||||
plot = plot,
|
||||
action = 'findvideos'
|
||||
)
|
||||
)
|
||||
else:
|
||||
matches = support.match(data.data, patron= r'text="(?P<title>[^"]+)" URL="(?P<url>[^"]+)"').matches
|
||||
for title, url in matches:
|
||||
itemlist.append(
|
||||
support.Item(
|
||||
channel = item.channel,
|
||||
title = support.typo(title, 'bold'),
|
||||
thumbnail = item.thumbnail,
|
||||
url = url,
|
||||
action = 'radio'
|
||||
)
|
||||
)
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
import xbmc
|
||||
itemlist = []
|
||||
item.action = 'play'
|
||||
urls = support.match(item.url).data.strip().split()
|
||||
for url in urls:
|
||||
item.url= url
|
||||
item.server = 'directo'
|
||||
itemlist.append(item)
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
item.url = host + '/Search.ashx?query=' +text
|
||||
try:
|
||||
return radio(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
@@ -152,8 +152,8 @@ def episodios(item):
|
||||
episodes.append(episode['episodes'])
|
||||
for episode in episodes:
|
||||
for key in episode:
|
||||
if 'stagione' in key['title'].encode('utf8').lower():
|
||||
match = support.match(key['title'].encode('utf8'), patron=r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)').match
|
||||
if 'stagione' in encode(key['title']).lower():
|
||||
match = support.match(encode(key['title']), patron=r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)').match
|
||||
title = match[0]+'x'+match[1] + ' - ' + item.fulltitle
|
||||
make_item = True
|
||||
elif int(key['season_id']) == int(season_id):
|
||||
@@ -175,10 +175,14 @@ def episodios(item):
|
||||
url= host + show_id + '/season/' + str(key['season_id']) + '/',
|
||||
action= 'findvideos',
|
||||
video_id= key['video_id'],
|
||||
thumbnail= item.thumbnail,
|
||||
fanart = item.fanart,
|
||||
plot=item.plot,
|
||||
contentType = item.contentType
|
||||
))
|
||||
autorenumber.renumber(itemlist, item, 'bold')
|
||||
if autorenumber.check(item) == True:
|
||||
if autorenumber.check(item) == True \
|
||||
or support.match(itemlist[0].title, patron=r"(\d+x\d+)").match:
|
||||
support.videolibrary(itemlist,item)
|
||||
return itemlist
|
||||
|
||||
@@ -211,10 +215,10 @@ def make_itemlist(itemlist, item, data):
|
||||
search = item.search if item.search else ''
|
||||
infoLabels = {}
|
||||
for key in data['data']:
|
||||
if search.lower() in key['title'].encode('utf8').lower():
|
||||
if search.lower() in encode(key['title']).lower():
|
||||
infoLabels['year'] = key['date_published']
|
||||
infoLabels['title'] = infoLabels['tvshowtitle'] = key['title']
|
||||
title = key['title'].encode('utf8')
|
||||
title = encode(key['title'])
|
||||
itemlist.append(
|
||||
Item(
|
||||
channel = item.channel,
|
||||
@@ -242,4 +246,4 @@ def encode(text):
|
||||
if sys.version_info[0] >= 3:
|
||||
return text
|
||||
else:
|
||||
return text.encode('utf8')
|
||||
return text.encode('utf8')
|
||||
@@ -12,9 +12,6 @@ import xbmcaddon
|
||||
addon = xbmcaddon.Addon('plugin.video.kod')
|
||||
downloadenabled = addon.getSetting('downloadenabled')
|
||||
|
||||
from specials import shortcuts
|
||||
CONTEXT = shortcuts.context()
|
||||
|
||||
def getmainlist(view="thumb_"):
|
||||
logger.info()
|
||||
itemlist = list()
|
||||
@@ -22,8 +19,7 @@ def getmainlist(view="thumb_"):
|
||||
if config.dev_mode():
|
||||
itemlist.append(Item(title="Redirect", channel="checkhost", action="check_channels",
|
||||
thumbnail='',
|
||||
category=config.get_localized_string(30119), viewmode="thumbnails",
|
||||
context = CONTEXT))
|
||||
category=config.get_localized_string(30119), viewmode="thumbnails"))
|
||||
# Añade los canales que forman el menú principal
|
||||
if addon.getSetting('enable_news_menu') == "true":
|
||||
# itemlist.append(Item(title=config.get_localized_string(30130), channel="news", action="mainlist",
|
||||
@@ -33,13 +29,12 @@ def getmainlist(view="thumb_"):
|
||||
itemlist.append(Item(title=config.get_localized_string(30130), channel="news", action="mainlist",
|
||||
thumbnail=get_thumb("news.png", view),
|
||||
category=config.get_localized_string(30119), viewmode="thumbnails",
|
||||
context=CONTEXT + [{"title": config.get_localized_string(70285), "channel": "shortcuts", "action": "SettingOnPosition", "category":5}]))
|
||||
context=[{"title": config.get_localized_string(70285), "channel": "shortcuts", "action": "SettingOnPosition", "category":5}]))
|
||||
|
||||
if addon.getSetting('enable_channels_menu') == "true":
|
||||
itemlist.append(Item(title=config.get_localized_string(30118), channel="channelselector", action="getchanneltypes",
|
||||
thumbnail=get_thumb("channels.png", view), view=view,
|
||||
category=config.get_localized_string(30119), viewmode="thumbnails",
|
||||
context = CONTEXT))
|
||||
category=config.get_localized_string(30119), viewmode="thumbnails"))
|
||||
|
||||
if addon.getSetting('enable_search_menu') == "true":
|
||||
# itemlist.append(Item(title=config.get_localized_string(30103), channel="search", path='special', action="mainlist",
|
||||
@@ -50,25 +45,22 @@ def getmainlist(view="thumb_"):
|
||||
itemlist.append(Item(title=config.get_localized_string(30103), channel="search", path='special', action="mainlist",
|
||||
thumbnail=get_thumb("search.png", view),
|
||||
category=config.get_localized_string(30119), viewmode="list",
|
||||
context = CONTEXT + [{"title": config.get_localized_string(60412), "action": "setting_channel_new", "channel": "search"},
|
||||
context = [{"title": config.get_localized_string(60412), "action": "setting_channel_new", "channel": "search"},
|
||||
{"title": config.get_localized_string(70286), "channel": "shortcuts", "action": "SettingOnPosition", "category":3}]))
|
||||
|
||||
if addon.getSetting('enable_onair_menu') == "true":
|
||||
itemlist.append(Item(channel="filmontv", action="mainlist", title=config.get_localized_string(50001),
|
||||
thumbnail=get_thumb("on_the_air.png"), viewmode="thumbnails",
|
||||
context = CONTEXT))
|
||||
thumbnail=get_thumb("on_the_air.png"), viewmode="thumbnails"))
|
||||
|
||||
if addon.getSetting('enable_link_menu') == "true":
|
||||
itemlist.append(Item(title=config.get_localized_string(70527), channel="kodfavorites", action="mainlist",
|
||||
thumbnail=get_thumb("mylink.png", view), view=view,
|
||||
category=config.get_localized_string(70527), viewmode="thumbnails",
|
||||
context = CONTEXT))
|
||||
category=config.get_localized_string(70527), viewmode="thumbnails"))
|
||||
|
||||
if addon.getSetting('enable_fav_menu') == "true":
|
||||
itemlist.append(Item(title=config.get_localized_string(30102), channel="favorites", action="mainlist",
|
||||
thumbnail=get_thumb("favorites.png", view),
|
||||
category=config.get_localized_string(30102), viewmode="thumbnails",
|
||||
context = CONTEXT))
|
||||
category=config.get_localized_string(30102), viewmode="thumbnails"))
|
||||
|
||||
if config.get_videolibrary_support() and addon.getSetting('enable_library_menu') == "true":
|
||||
# itemlist.append(Item(title=config.get_localized_string(30131), channel="videolibrary", action="mainlist",
|
||||
@@ -79,7 +71,7 @@ def getmainlist(view="thumb_"):
|
||||
itemlist.append(Item(title=config.get_localized_string(30131), channel="videolibrary", action="mainlist",
|
||||
thumbnail=get_thumb("videolibrary.png", view),
|
||||
category=config.get_localized_string(30119), viewmode="thumbnails",
|
||||
context=CONTEXT + [{"title": config.get_localized_string(70287), "channel": "shortcuts", "action": "SettingOnPosition", "category":2},
|
||||
context=[{"title": config.get_localized_string(70287), "channel": "shortcuts", "action": "SettingOnPosition", "category":2},
|
||||
{"title": config.get_localized_string(60568), "channel": "videolibrary", "action": "update_videolibrary"}]))
|
||||
if downloadenabled != "false":
|
||||
# itemlist.append(Item(title=config.get_localized_string(30101), channel="downloads", action="mainlist",
|
||||
@@ -88,7 +80,7 @@ def getmainlist(view="thumb_"):
|
||||
# "action": "channel_config"}]))
|
||||
itemlist.append(Item(title=config.get_localized_string(30101), channel="downloads", action="mainlist",
|
||||
thumbnail=get_thumb("downloads.png", view), viewmode="list",
|
||||
context=CONTEXT + [{"title": config.get_localized_string(70288), "channel": "shortcuts", "action": "SettingOnPosition", "category":4}]))
|
||||
context=[{"title": config.get_localized_string(70288), "channel": "shortcuts", "action": "SettingOnPosition", "category":4}]))
|
||||
|
||||
thumb_setting = "setting_%s.png" % 0 # config.get_setting("plugin_updates_available")
|
||||
|
||||
@@ -108,7 +100,7 @@ def getchanneltypes(view="thumb_"):
|
||||
logger.info()
|
||||
|
||||
# Lista de categorias
|
||||
channel_types = ["movie", "tvshow", "anime", "documentary", "vos", "direct", "live"] # , "torrent"
|
||||
channel_types = ["movie", "tvshow", "anime", "documentary", "vos", "direct", "live", "music"] # , "torrent"
|
||||
|
||||
if config.get_setting("adult_mode") != 0:
|
||||
channel_types.append("adult")
|
||||
@@ -122,13 +114,13 @@ def getchanneltypes(view="thumb_"):
|
||||
title = config.get_localized_string(30121)
|
||||
itemlist.append(Item(title=title, channel="channelselector", action="filterchannels", view=view,
|
||||
category=title, channel_type="all", thumbnail=get_thumb("all.png", view),
|
||||
viewmode="thumbnails", context = CONTEXT))
|
||||
viewmode="thumbnails"))
|
||||
|
||||
for channel_type in channel_types:
|
||||
title = config.get_localized_category(channel_type)
|
||||
itemlist.append(Item(title=title, channel="channelselector", action="filterchannels", category=title,
|
||||
channel_type=channel_type, viewmode="thumbnails",
|
||||
thumbnail=get_thumb("%s.png" % channel_type, view), context = CONTEXT))
|
||||
thumbnail=get_thumb("%s.png" % channel_type, view)))
|
||||
|
||||
# itemlist.append(Item(title='Oggi in TV', channel="filmontv", action="mainlist", view=view,
|
||||
# category=title, channel_type="all", thumbnail=get_thumb("on_the_air.png", view),
|
||||
@@ -138,7 +130,7 @@ def getchanneltypes(view="thumb_"):
|
||||
|
||||
itemlist.append(Item(title=config.get_localized_string(70685), channel="community", action="mainlist", view=view,
|
||||
category=config.get_localized_string(70685), channel_type="all", thumbnail=get_thumb("community.png", view),
|
||||
viewmode="thumbnails", context = CONTEXT))
|
||||
viewmode="thumbnails"))
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -244,7 +236,7 @@ def filterchannels(category, view="thumb_"):
|
||||
channelslist.append(Item(title=channel_parameters["title"], channel=channel_parameters["channel"],
|
||||
action="mainlist", thumbnail=channel_parameters["thumbnail"],
|
||||
fanart=channel_parameters["fanart"], plot=channel_info, category=channel_parameters["title"],
|
||||
language=channel_parameters["language"], viewmode="list", context=CONTEXT + context))
|
||||
language=channel_parameters["language"], viewmode="list", context=context))
|
||||
|
||||
except:
|
||||
logger.error("Se ha producido un error al leer los datos del canal '%s'" % channel)
|
||||
@@ -398,8 +390,8 @@ def thumb(item_or_itemlist=None, genre=False, thumb=''):
|
||||
'biographical':['biografico', 'biographical'],
|
||||
'comedy':['comico', 'commedia', 'demenziale', 'comedy'],
|
||||
'adult':['erotico', 'hentai', 'harem', 'ecchi', 'adult'],
|
||||
'drama':['drammatico', 'drama'],
|
||||
'syfy':['fantascienza', 'science fiction', 'syfy'],
|
||||
'drama':['drammatico', 'drama', 'dramma'],
|
||||
'syfy':['fantascienza', 'science fiction', 'syfy', 'sci'],
|
||||
'fantasy':['fantasy', 'magia', 'magic'],
|
||||
'crime':['gangster','poliziesco', 'crime', 'crimine'],
|
||||
'grotesque':['grottesco', 'grotesque'],
|
||||
@@ -415,7 +407,7 @@ def thumb(item_or_itemlist=None, genre=False, thumb=''):
|
||||
'on_the_air' : ['corso', 'onda', 'diretta', 'dirette'],
|
||||
'western':['western'],
|
||||
'vos':['sub','sub-ita'],
|
||||
'romance':['romantico','sentimentale', 'romance'],
|
||||
'romance':['romantico','sentimentale', 'romance', 'soap'],
|
||||
'family':['famiglia','famiglie', 'family', 'historical'],
|
||||
'historical':['storico', 'history', 'storia'],
|
||||
'az':['lettera','lista','alfabetico','a-z', 'alphabetical'],
|
||||
|
||||
@@ -44,8 +44,7 @@ def get_channel_parameters(channel_name):
|
||||
channel_parameters["adult"] = channel_parameters.get("adult", False)
|
||||
logger.info(channel_parameters["adult"])
|
||||
if channel_parameters["adult"]:
|
||||
channel_parameters["update_url"] = channel_parameters.get("update_url",
|
||||
DEFAULT_UPDATE_URL + 'porn/')
|
||||
channel_parameters["update_url"] = channel_parameters.get("update_url", DEFAULT_UPDATE_URL + 'porn/')
|
||||
else:
|
||||
channel_parameters["update_url"] = channel_parameters.get("update_url", DEFAULT_UPDATE_URL)
|
||||
channel_parameters["language"] = channel_parameters.get("language", ["all"])
|
||||
|
||||
@@ -19,6 +19,9 @@ metodos:
|
||||
"""
|
||||
from __future__ import division
|
||||
from future import standard_library
|
||||
|
||||
from core.item import Item
|
||||
|
||||
standard_library.install_aliases()
|
||||
from builtins import range
|
||||
from builtins import object
|
||||
@@ -102,22 +105,24 @@ class Downloader(object):
|
||||
# Funciones
|
||||
def start_dialog(self, title=config.get_localized_string(60200)):
|
||||
from platformcode import platformtools
|
||||
progreso = platformtools.dialog_progress(title, config.get_localized_string(60201))
|
||||
self.start()
|
||||
while self.state == self.states.downloading and not progreso.iscanceled():
|
||||
time.sleep(0.1)
|
||||
line1 = "%s" % (self.filename)
|
||||
line2 = config.get_localized_string(59983) % (
|
||||
self.progress, self.downloaded[1], self.downloaded[2], self.size[1], self.size[2],
|
||||
self.speed[1], self.speed[2], self.connections[0], self.connections[1])
|
||||
line3 = config.get_localized_string(60202) % (self.remaining_time)
|
||||
progreso = platformtools.dialog_progress_bg(title, config.get_localized_string(60201))
|
||||
try:
|
||||
self.start()
|
||||
while self.state == self.states.downloading:
|
||||
time.sleep(0.2)
|
||||
line1 = "%s" % (self.filename)
|
||||
line2 = config.get_localized_string(59983) % (
|
||||
self.downloaded[1], self.downloaded[2], self.size[1], self.size[2],
|
||||
self.speed[1], self.speed[2], self.connections[0], self.connections[1])
|
||||
line3 = config.get_localized_string(60202) % (self.remaining_time)
|
||||
|
||||
progreso.update(int(self.progress), line1, line2, line3)
|
||||
if self.state == self.states.downloading:
|
||||
self.stop()
|
||||
progreso.close()
|
||||
progreso.update(int(self.progress), line1, line2 + " " + line3)
|
||||
self.__update_json()
|
||||
finally:
|
||||
progreso.close()
|
||||
|
||||
def start(self):
|
||||
self.__update_json(started=False)
|
||||
if self._state == self.states.error: return
|
||||
conns = []
|
||||
for x in range(self._max_connections):
|
||||
@@ -190,7 +195,7 @@ class Downloader(object):
|
||||
|
||||
# Funciones internas
|
||||
def __init__(self, url, path, filename=None, headers=[], resume=True, max_connections=10, block_size=2 ** 17,
|
||||
part_size=2 ** 24, max_buffer=10):
|
||||
part_size=2 ** 24, max_buffer=10, json_path=None):
|
||||
# Parametros
|
||||
self._resume = resume
|
||||
self._path = path
|
||||
@@ -199,6 +204,9 @@ class Downloader(object):
|
||||
self._block_size = block_size
|
||||
self._part_size = part_size
|
||||
self._max_buffer = max_buffer
|
||||
self._json_path = json_path
|
||||
self._json_text = ''
|
||||
self._json_item = Item()
|
||||
|
||||
try:
|
||||
import xbmc
|
||||
@@ -258,7 +266,7 @@ class Downloader(object):
|
||||
self.__get_download_info__()
|
||||
|
||||
try:
|
||||
logger.info("Descarga inicializada: Partes: %s | Ruta: %s | Archivo: %s | Tamaño: %s" % \
|
||||
logger.info("Download started: Parts: %s | Path: %s | File: %s | Size: %s" % \
|
||||
(str(len(self._download_info["parts"])), self._pathencode('utf-8'), \
|
||||
self._filenameencode('utf-8'), str(self._download_info["size"])))
|
||||
except:
|
||||
@@ -579,3 +587,20 @@ class Downloader(object):
|
||||
|
||||
self.__set_part_stopped__(id)
|
||||
logger.info("Thread stopped: %s" % threading.current_thread().name)
|
||||
|
||||
def __update_json(self, started=True):
|
||||
text = filetools.read(self._json_path)
|
||||
# load item only if changed
|
||||
if self._json_text != text:
|
||||
self._json_text = text
|
||||
self._json_item = Item().fromjson(text)
|
||||
logger.info('item loaded')
|
||||
progress = int(self.progress)
|
||||
if started and self._json_item.downloadStatus == 0: # stopped
|
||||
logger.info('Download paused')
|
||||
self.stop()
|
||||
elif self._json_item.downloadProgress != progress or not started:
|
||||
params = {"downloadStatus": 4, "downloadComplete": 0, "downloadProgress": progress}
|
||||
self._json_item.__dict__.update(params)
|
||||
self._json_text = self._json_item.tojson()
|
||||
filetools.write(self._json_path, self._json_text)
|
||||
|
||||
@@ -123,6 +123,7 @@ def load_cookies(alfa_s=False):
|
||||
os.remove(cookies_file)
|
||||
cookies_lock.release()
|
||||
|
||||
load_cookies()
|
||||
|
||||
def save_cookies(alfa_s=False):
|
||||
cookies_lock.acquire()
|
||||
@@ -131,8 +132,6 @@ def save_cookies(alfa_s=False):
|
||||
cookies_lock.release()
|
||||
|
||||
|
||||
load_cookies()
|
||||
|
||||
def random_useragent():
|
||||
"""
|
||||
Based on code from https://github.com/theriley106/RandomHeaders
|
||||
@@ -257,7 +256,6 @@ def downloadpage(url, **opt):
|
||||
|
||||
"""
|
||||
url = scrapertools.unescape(url)
|
||||
load_cookies()
|
||||
domain = urlparse.urlparse(url).netloc
|
||||
global domainCF
|
||||
CF = False
|
||||
|
||||
@@ -13,10 +13,9 @@ if PY3:
|
||||
#from future import standard_library
|
||||
#standard_library.install_aliases()
|
||||
import urllib.parse as urllib # Es muy lento en PY2. En PY3 es nativo
|
||||
from html.parser import HTMLParser
|
||||
else:
|
||||
import urllib # Usamos el nativo de PY2 que es más rápido
|
||||
from HTMLParser import HTMLParser
|
||||
from core.scrapertools import unescape
|
||||
|
||||
import base64
|
||||
import copy
|
||||
@@ -454,7 +453,7 @@ class Item(object):
|
||||
"""
|
||||
try:
|
||||
unicode_title = unicode(value, "utf8", "ignore")
|
||||
return HTMLParser().unescape(unicode_title).encode("utf8")
|
||||
return unescape(unicode_title).encode("utf8")
|
||||
except:
|
||||
if PY3 and isinstance(value, bytes):
|
||||
value = value.decode("utf8")
|
||||
|
||||
@@ -120,7 +120,7 @@ def unescape(text):
|
||||
pass
|
||||
return text # leave as is
|
||||
|
||||
return re.sub("&#?\w+;", fixup, text)
|
||||
return re.sub("&#?\w+;", str(fixup), str(text))
|
||||
|
||||
# Convierte los codigos html "ñ" y lo reemplaza por "ñ" caracter unicode utf-8
|
||||
|
||||
@@ -418,14 +418,14 @@ def get_season_and_episode(title):
|
||||
"""
|
||||
filename = ""
|
||||
|
||||
patrons = ["(\d+)x(\d+)", "(?:s|t)(\d+)e(\d+)",
|
||||
"(?:season|temp\w*)\s*(\d+)\s*(?:capitulo|epi\w*)\s*(\d+)"]
|
||||
patrons = ["(\d+)\s*[x-]\s*(\d+)", "(\d+)\s*×\s*(\d+)", "(?:[Ss]|[Tt])(\d+)(?:[Ee]|Ep\.)(\d+)",
|
||||
"(?:[Ss]tag|[Ss]eason|[Ss]tagione\w*)\s*(\d+)\s*(?:[Ee]pi|[Ee]pisode|[Ee]pisodio\w*)\s*(\d+)"]
|
||||
|
||||
for patron in patrons:
|
||||
try:
|
||||
matches = re.compile(patron, re.I).search(title)
|
||||
if matches:
|
||||
filename = matches.group(1) + "x" + matches.group(2).zfill(2)
|
||||
filename = str(int(matches.group(1))) + "x" + str(int(matches.group(2))).zfill(2)
|
||||
break
|
||||
except:
|
||||
pass
|
||||
|
||||
@@ -220,7 +220,7 @@ def get_server_from_url(url):
|
||||
return devuelve
|
||||
|
||||
|
||||
def resolve_video_urls_for_playing(server, url, video_password="", muestra_dialogo=False):
|
||||
def resolve_video_urls_for_playing(server, url, video_password="", muestra_dialogo=False, background_dialog=False):
|
||||
"""
|
||||
Función para obtener la url real del vídeo
|
||||
@param server: Servidor donde está alojado el vídeo
|
||||
@@ -231,6 +231,8 @@ def resolve_video_urls_for_playing(server, url, video_password="", muestra_dialo
|
||||
@type video_password: str
|
||||
@param muestra_dialogo: Muestra el diálogo de progreso
|
||||
@type muestra_dialogo: bool
|
||||
@type background_dialog: bool
|
||||
@param background_dialog: if progress dialog should be in background
|
||||
|
||||
@return: devuelve la url del video
|
||||
@rtype: list
|
||||
@@ -261,7 +263,7 @@ def resolve_video_urls_for_playing(server, url, video_password="", muestra_dialo
|
||||
if server_parameters:
|
||||
# Muestra un diágo de progreso
|
||||
if muestra_dialogo:
|
||||
progreso = platformtools.dialog_progress(config.get_localized_string(20000),
|
||||
progreso = (platformtools.dialog_progress_bg if background_dialog else platformtools.dialog_progress)(config.get_localized_string(20000),
|
||||
config.get_localized_string(70180) % server_parameters["name"])
|
||||
|
||||
# Cuenta las opciones disponibles, para calcular el porcentaje
|
||||
@@ -292,6 +294,8 @@ def resolve_video_urls_for_playing(server, url, video_password="", muestra_dialo
|
||||
logger.info("Servidor importado: %s" % server_module)
|
||||
except:
|
||||
server_module = None
|
||||
if muestra_dialogo:
|
||||
progreso.close()
|
||||
logger.error("No se ha podido importar el servidor: %s" % server)
|
||||
import traceback
|
||||
logger.error(traceback.format_exc())
|
||||
@@ -305,6 +309,8 @@ def resolve_video_urls_for_playing(server, url, video_password="", muestra_dialo
|
||||
if not video_exists:
|
||||
error_messages.append(message)
|
||||
logger.info("test_video_exists dice que el video no existe")
|
||||
if muestra_dialogo:
|
||||
progreso.close()
|
||||
else:
|
||||
logger.info("test_video_exists dice que el video SI existe")
|
||||
except:
|
||||
|
||||
148
core/support.py
@@ -26,9 +26,7 @@ from core import httptools, scrapertools, servertools, tmdb, channeltools
|
||||
from core.item import Item
|
||||
from lib import unshortenit
|
||||
from platformcode import logger, config
|
||||
from specials import autoplay, shortcuts
|
||||
|
||||
CONTEXT =shortcuts.context()
|
||||
from specials import autoplay
|
||||
|
||||
def hdpass_get_servers(item):
|
||||
def get_hosts(url, quality):
|
||||
@@ -40,15 +38,15 @@ def hdpass_get_servers(item):
|
||||
for mir_url, srv in scrapertools.find_multiple_matches(mir, patron_option):
|
||||
mir_url = scrapertools.decodeHtmlentities(mir_url)
|
||||
ret.append(Item(channel=item.channel,
|
||||
action="play",
|
||||
fulltitle=item.fulltitle,
|
||||
quality=quality,
|
||||
show=item.show,
|
||||
thumbnail=item.thumbnail,
|
||||
contentType=item.contentType,
|
||||
title=srv,
|
||||
server=srv,
|
||||
url= mir_url))
|
||||
action="play",
|
||||
fulltitle=item.fulltitle,
|
||||
quality=quality,
|
||||
show=item.show,
|
||||
thumbnail=item.thumbnail,
|
||||
contentType=item.contentType,
|
||||
title=srv,
|
||||
server=srv,
|
||||
url= mir_url))
|
||||
return ret
|
||||
# Carica la pagina
|
||||
itemlist = []
|
||||
@@ -176,11 +174,10 @@ def cleantitle(title):
|
||||
def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, typeContentDict, typeActionDict, blacklist, search, pag, function, lang):
|
||||
itemlist = []
|
||||
log("scrapeBlock qui")
|
||||
matches = scrapertools.find_multiple_matches_groups(block, patron)
|
||||
log('MATCHES =', matches)
|
||||
|
||||
if debug:
|
||||
regexDbg(item, patron, headers, block)
|
||||
matches = scrapertools.find_multiple_matches_groups(block, patron)
|
||||
log('MATCHES =', matches)
|
||||
|
||||
known_keys = ['url', 'title', 'title2', 'season', 'episode', 'thumb', 'quality', 'year', 'plot', 'duration', 'genere', 'rating', 'type', 'lang', 'other']
|
||||
# Legenda known_keys per i groups nei patron
|
||||
@@ -264,7 +261,7 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
|
||||
infolabels['plot'] = plot
|
||||
if scraped['duration']:
|
||||
matches = scrapertools.find_multiple_matches(scraped['duration'],
|
||||
r'([0-9])\s*?(?:[hH]|:|\.|,|\\|\/|\||\s)\s*?([0-9]+)')
|
||||
r'([0-9])\s*?(?:[hH]|:|\.|,|\\|\/|\||\s)\s*?([0-9]+)')
|
||||
for h, m in matches:
|
||||
scraped['duration'] = int(h) * 60 + int(m)
|
||||
if not matches:
|
||||
@@ -308,8 +305,7 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
|
||||
contentLanguage = lang1,
|
||||
contentEpisodeNumber=episode if episode else '',
|
||||
news= item.news if item.news else '',
|
||||
other = scraped['other'] if scraped['other'] else '',
|
||||
context = CONTEXT
|
||||
other = scraped['other'] if scraped['other'] else ''
|
||||
)
|
||||
|
||||
# for lg in list(set(listGroups).difference(known_keys)):
|
||||
@@ -389,7 +385,8 @@ def scrape(func):
|
||||
if not data:
|
||||
page = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True)
|
||||
# if url may be changed and channel has findhost to update
|
||||
if (not page.data or scrapertools.get_domain_from_url(page.url) != scrapertools.get_domain_from_url(item.url)) and 'findhost' in func.__globals__:
|
||||
if 'findhost' in func.__globals__ and (not page.data or scrapertools.get_domain_from_url(page.url).lower() != scrapertools.get_domain_from_url(item.url).lower()):
|
||||
logger.info('running findhost ' + func.__module__)
|
||||
host = func.__globals__['findhost']()
|
||||
parse = list(urlparse.urlparse(item.url))
|
||||
from core import jsontools
|
||||
@@ -633,8 +630,7 @@ def menuItem(itemlist, filename, title='', action='', url='', contentType='movie
|
||||
url = url,
|
||||
extra = extra,
|
||||
args = args,
|
||||
contentType = contentType,
|
||||
context = CONTEXT
|
||||
contentType = contentType
|
||||
))
|
||||
|
||||
# Apply auto Thumbnails at the menus
|
||||
@@ -697,7 +693,7 @@ def menu(func):
|
||||
if dictUrl[name] is not None and type(dictUrl[name]) is not str:
|
||||
for sub, var in dictUrl[name]:
|
||||
menuItem(itemlist, filename,
|
||||
title = sub + ' submenu' + typo(title,'_ {}'),
|
||||
title = sub + ' submenu {' + title + '}',
|
||||
url = host + var[0] if len(var) > 0 else '',
|
||||
action = var[1] if len(var) > 1 else 'peliculas',
|
||||
args=var[2] if len(var) > 2 else '',
|
||||
@@ -745,15 +741,27 @@ def typo(string, typography=''):
|
||||
|
||||
# If there are no attributes, it applies the default ones
|
||||
attribute = ['[]','()','submenu','color','bold','italic','_','--','[B]','[I]','[COLOR]']
|
||||
|
||||
if int(config.get_setting('view_mode_channel').split(',')[-1]) in [0, 50, 55]:
|
||||
VLT = True
|
||||
else:
|
||||
VLT = False
|
||||
# Otherwise it uses the typographical attributes of the string
|
||||
# else:
|
||||
if 'capitalize' in string.lower():
|
||||
string = re.sub(r'\s*capitalize','',string).capitalize()
|
||||
if 'uppercase' in string.lower():
|
||||
string = re.sub(r'\s*uppercase','',string).upper()
|
||||
if 'lowercase' in string.lower():
|
||||
string = re.sub(r'\s*lowercase','',string).lower()
|
||||
if '[]' in string:
|
||||
string = '[' + re.sub(r'\s*\[\]','',string) + ']'
|
||||
if '()' in string:
|
||||
string = '(' + re.sub(r'\s*\(\)','',string) + ')'
|
||||
if 'submenu' in string:
|
||||
string = "•• " + re.sub(r'\s*submenu','',string)
|
||||
if VLT:
|
||||
string = "•• " + re.sub(r'\s*submenu','',string)
|
||||
else:
|
||||
string = re.sub(r'\s*submenu','',string)
|
||||
if 'color' in string:
|
||||
color = scrapertools.find_single_match(string, 'color ([a-z]+)')
|
||||
if color == 'kod' or '': color = kod_color
|
||||
@@ -767,13 +775,10 @@ def typo(string, typography=''):
|
||||
if '--' in string:
|
||||
string = ' - ' + re.sub(r'\s*--','',string)
|
||||
if 'bullet' in string:
|
||||
string = '[B]' + "•" + '[/B] ' + re.sub(r'\s*bullet','',string)
|
||||
if 'capitalize' in string.lower():
|
||||
string = re.sub(r'\s*capitalize','',string).capitalize()
|
||||
if 'uppercase' in string.lower():
|
||||
string = re.sub(r'\s*uppercase','',string).upper()
|
||||
if 'lowercase' in string.lower():
|
||||
string = re.sub(r'\s*lowercase','',string).lower()
|
||||
if VLT:
|
||||
string = '[B]' + "•" + '[/B] ' + re.sub(r'\s*bullet','',string)
|
||||
else:
|
||||
string = re.sub(r'\s*bullet','',string)
|
||||
if '{}' in string:
|
||||
string = re.sub(r'\s*\{\}','',string)
|
||||
|
||||
@@ -915,23 +920,34 @@ def download(itemlist, item, typography='', function_level=1, function=''):
|
||||
|
||||
contentSerieName=item.contentSerieName if item.contentSerieName else ''
|
||||
contentTitle=item.contentTitle if item.contentTitle else ''
|
||||
downloadItemlist = [i.tourl() for i in itemlist]
|
||||
|
||||
if itemlist and item.contentChannel != 'videolibrary':
|
||||
itemlist.append(
|
||||
Item(channel='downloads',
|
||||
from_channel=item.channel,
|
||||
title=title,
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.fulltitle,
|
||||
contentType=item.contentType,
|
||||
contentSerieName=contentSerieName,
|
||||
url=item.url,
|
||||
action='save_download',
|
||||
from_action=from_action,
|
||||
contentTitle=contentTitle,
|
||||
path=item.path,
|
||||
thumbnail=thumb(thumb='downloads.png')
|
||||
))
|
||||
show = True
|
||||
# do not show if we are on findvideos and there are no valid servers
|
||||
if from_action == 'findvideos':
|
||||
for i in itemlist:
|
||||
if i.action == 'play':
|
||||
break
|
||||
else:
|
||||
show = False
|
||||
if show:
|
||||
itemlist.append(
|
||||
Item(channel='downloads',
|
||||
from_channel=item.channel,
|
||||
title=title,
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.fulltitle,
|
||||
contentType=item.contentType,
|
||||
contentSerieName=contentSerieName,
|
||||
url=item.url,
|
||||
action='save_download',
|
||||
from_action=from_action,
|
||||
contentTitle=contentTitle,
|
||||
path=item.path,
|
||||
thumbnail=thumb(thumb='downloads.png'),
|
||||
downloadItemlist=downloadItemlist
|
||||
))
|
||||
if from_action == 'episodios':
|
||||
itemlist.append(
|
||||
Item(channel='downloads',
|
||||
@@ -946,8 +962,9 @@ def download(itemlist, item, typography='', function_level=1, function=''):
|
||||
from_action=from_action,
|
||||
contentTitle=contentTitle,
|
||||
download='season',
|
||||
thumbnail=thumb(thumb='downloads.png')
|
||||
))
|
||||
thumbnail=thumb(thumb='downloads.png'),
|
||||
downloadItemlist=downloadItemlist
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -985,18 +1002,20 @@ def videolibrary(itemlist, item, typography='', function_level=1, function=''):
|
||||
if (function == 'findvideos' and contentType == 'movie') \
|
||||
or (function == 'episodios' and contentType != 'movie'):
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
from channelselector import get_thumb
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title=title,
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.fulltitle,
|
||||
contentType=contentType,
|
||||
contentTitle=contentTitle,
|
||||
contentSerieName=contentSerieName,
|
||||
url=item.url,
|
||||
action=action,
|
||||
extra=extra,
|
||||
contentTitle=contentTitle,
|
||||
path=item.path
|
||||
path=item.path,
|
||||
thumbnail=get_thumb('add_to_videolibrary.png')
|
||||
))
|
||||
|
||||
return itemlist
|
||||
@@ -1038,7 +1057,7 @@ def pagination(itemlist, item, page, perpage, function_level=1):
|
||||
thumbnail=thumb()))
|
||||
return itemlist
|
||||
|
||||
def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=True, down_load=True, patronTag=None):
|
||||
def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=True, down_load=True, patronTag=None, video_library=True):
|
||||
|
||||
if not data and not itemlist:
|
||||
data = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True).data
|
||||
@@ -1068,7 +1087,7 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru
|
||||
item.title = typo(item.contentTitle.strip(),'bold') if item.contentType == 'movie' or (config.get_localized_string(30161) in item.title) else item.title
|
||||
|
||||
videoitem.plot= typo(videoitem.title, 'bold') + typo(videoitem.quality, '_ [] bold')
|
||||
videoitem.title = item.title + (typo(videoitem.title, '_ color kod [] bold') if videoitem.title else "") + (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "")
|
||||
videoitem.title = (item.title if item.channel not in ['url'] else '') + (typo(videoitem.title, '_ color kod [] bold') if videoitem.title else "") + (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "")
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.show = item.show
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
@@ -1078,9 +1097,9 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru
|
||||
|
||||
if patronTag:
|
||||
addQualityTag(item, verifiedItemlist, data, patronTag)
|
||||
return controls(verifiedItemlist, item, AutoPlay, CheckLinks, down_load)
|
||||
return controls(verifiedItemlist, item, AutoPlay, CheckLinks, down_load, video_library)
|
||||
|
||||
def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True):
|
||||
def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True, video_library=True):
|
||||
from core import jsontools
|
||||
from platformcode.config import get_setting
|
||||
|
||||
@@ -1088,13 +1107,17 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True):
|
||||
autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY')
|
||||
channel_node = autoplay_node.get(item.channel, {})
|
||||
if not channel_node: # non ha mai aperto il menu del canale quindi in autoplay_data.json non c'e la key
|
||||
channelFile = __import__('channels.' + item.channel, fromlist=["channels.%s" % item.channel])
|
||||
autoplay.init(item.channel, channelFile.list_servers, channelFile.list_quality)
|
||||
try:
|
||||
channelFile = __import__('channels.' + item.channel, fromlist=["channels.%s" % item.channel])
|
||||
except:
|
||||
channelFile = __import__('specials.' + item.channel, fromlist=["specials.%s" % item.channel])
|
||||
if hasattr(channelFile, 'list_servers') and hasattr(channelFile, 'list_quality'):
|
||||
autoplay.init(item.channel, channelFile.list_servers, channelFile.list_quality)
|
||||
|
||||
autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY')
|
||||
channel_node = autoplay_node.get(item.channel, {})
|
||||
settings_node = channel_node.get('settings', {})
|
||||
AP = get_setting('autoplay') or settings_node['active']
|
||||
AP = get_setting('autoplay') or (settings_node['active'] if 'active' in settings_node else False)
|
||||
HS = config.get_setting('hide_servers') or (settings_node['hide_servers'] if 'hide_server' in settings_node else False)
|
||||
|
||||
if CL and not AP:
|
||||
@@ -1109,7 +1132,7 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True):
|
||||
if AutoPlay == True and not 'downloads' in inspect.stack()[3][1] + inspect.stack()[4][1]:
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
if item.contentChannel != 'videolibrary': videolibrary(itemlist, item, function_level=3)
|
||||
if item.contentChannel != 'videolibrary' and video_library: videolibrary(itemlist, item, function_level=3)
|
||||
if get_setting('downloadenabled') and down_load == True: download(itemlist, item, function_level=3)
|
||||
|
||||
VL = False
|
||||
@@ -1156,7 +1179,7 @@ def channel_config(item, itemlist):
|
||||
itemlist.append(
|
||||
Item(channel='setting',
|
||||
action="channel_config",
|
||||
title=typo("Configurazione Canale color kod bold"),
|
||||
title=typo(config.get_localized_string(60587), 'color kod bold'),
|
||||
config=item.channel,
|
||||
folder=False,
|
||||
thumbnail=get_thumb('setting_0.png'))
|
||||
@@ -1197,6 +1220,8 @@ def addQualityTag(item, itemlist, data, patron):
|
||||
"DLMux": "si tratta di un 720p o 1080p reperiti dalla versione americana di iTunes americano. La qualità è paragonabile a quella di un BluRayRip e permette di fruire di episodi televisivi, senza il fastidioso bollo distintivo della rete che trasmette.",
|
||||
"DVD5": "il film è in formato DVD Single Layer, nel quale vengono mantenute tutte le caratteristiche del DVD originale: tra queste il menu multilingue, i sottotitoli e i contenuti speciali, se presenti. Il video è codificato nel formato DVD originale MPEG-2.",
|
||||
"DVD9": "ha le stesse caratteristiche del DVD5, ma le dimensioni del file sono di un DVD Dual Layer (8,5 GB).",
|
||||
"HDTS": "viene utilizzata una videocamera professionale ad alta definizione posizionata in modo fisso. La qualità audio video è buona.",
|
||||
"DVDMUX": "indica una buona qualità video, l’audio è stato aggiunto da una sorgente diversa per una migliore qualità.",
|
||||
}
|
||||
|
||||
defQualAudio = {
|
||||
@@ -1206,6 +1231,7 @@ def addQualityTag(item, itemlist, data, patron):
|
||||
"DD": "audio ricavato dai dischi DTS cinema. L’audio è di buona qualità, ma potreste riscontrare il fatto che non potrebbe essere più riproducibile.",
|
||||
"AC3": "audio in Dolby Digital puo' variare da 2.0 a 5.1 canali in alta qualità.",
|
||||
"MP3": "codec per compressione audio utilizzato MP3.",
|
||||
"RESYNC": "il film è stato lavorato e re sincronizzato con una traccia audio. A volte potresti riscontrare una mancata sincronizzazione tra audio e video.",
|
||||
}
|
||||
qualityStr = scrapertools.find_single_match(data, patron).strip()
|
||||
if PY3:
|
||||
@@ -1215,7 +1241,9 @@ def addQualityTag(item, itemlist, data, patron):
|
||||
|
||||
if qualityStr:
|
||||
try:
|
||||
audio, video = qualityStr.split('.')
|
||||
splitted = qualityStr.split('.')
|
||||
video = splitted[-1]
|
||||
audio = splitted[-2]
|
||||
descr = typo(video + ': ', 'color kod') + defQualVideo.get(video.upper(), '') + '\n' +\
|
||||
typo(audio + ': ', 'color kod') + defQualAudio.get(audio.upper(), '')
|
||||
except:
|
||||
|
||||
@@ -32,8 +32,8 @@ from core.item import InfoLabels
|
||||
from platformcode import config
|
||||
from platformcode import logger
|
||||
|
||||
addon = xbmcaddon.Addon('metadata.themoviedb.org')
|
||||
def_lang = addon.getSetting('language')
|
||||
info_language = ["de", "en", "es", "fr", "it", "pt"] # from videolibrary.json
|
||||
def_lang = info_language[config.get_setting("info_language", "videolibrary")]
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------
|
||||
# Conjunto de funciones relacionadas con las infoLabels.
|
||||
|
||||
@@ -25,11 +25,9 @@ from platformcode import platformtools
|
||||
HOST = "https://api.thetvdb.com"
|
||||
HOST_IMAGE = "http://thetvdb.com/banners/"
|
||||
|
||||
import xbmcaddon
|
||||
addon = xbmcaddon.Addon('metadata.tvdb.com')
|
||||
|
||||
TOKEN = config.get_setting("tvdb_token", default="")
|
||||
DEFAULT_LANG = addon.getSetting('language')
|
||||
info_language = ["de", "en", "es", "fr", "it", "pt"] # from videolibrary.json
|
||||
DEFAULT_LANG = info_language[config.get_setting("info_language", "videolibrary")]
|
||||
DEFAULT_HEADERS = {
|
||||
'Content-Type': 'application/json',
|
||||
'Accept': 'application/json, application/vnd.thetvdb.v2.1.1',
|
||||
|
||||
@@ -130,7 +130,7 @@ def save_movie(item):
|
||||
# progress dialog
|
||||
p_dialog = platformtools.dialog_progress(config.get_localized_string(20000), config.get_localized_string(60062))
|
||||
|
||||
if config.get_setting("original_title_folder", "videolibrary") == 1 and item.infoLabels['originaltitle']:
|
||||
if config.get_setting("original_title_folder", "videolibrary") and item.infoLabels['originaltitle']:
|
||||
base_name = item.infoLabels['originaltitle']
|
||||
else:
|
||||
base_name = item.contentTitle
|
||||
@@ -140,7 +140,7 @@ def save_movie(item):
|
||||
else:
|
||||
base_name = filetools.validate_path(base_name.replace('/', '-'))
|
||||
|
||||
if config.get_setting("lowerize_title", "videolibrary") == 0:
|
||||
if config.get_setting("lowerize_title", "videolibrary"):
|
||||
base_name = base_name.lower()
|
||||
|
||||
for raiz, subcarpetas, ficheros in filetools.walk(MOVIES_PATH):
|
||||
@@ -221,7 +221,7 @@ def save_movie(item):
|
||||
if filetools.write(nfo_path, head_nfo + item_nfo.tojson()):
|
||||
#logger.info("FOLDER_MOVIES : %s" % FOLDER_MOVIES)
|
||||
# actualizamos la videoteca de Kodi con la pelicula
|
||||
if config.is_xbmc():
|
||||
if config.is_xbmc() and config.get_setting("videolibrary_kodi"):
|
||||
from platformcode import xbmc_videolibrary
|
||||
xbmc_videolibrary.update()
|
||||
|
||||
@@ -234,12 +234,55 @@ def save_movie(item):
|
||||
p_dialog.close()
|
||||
return 0, 0, -1
|
||||
|
||||
def update_renumber_options(item, head_nfo, path):
|
||||
from core import jsontools
|
||||
# from core.support import dbg;dbg()
|
||||
tvshow_path = filetools.join(path, 'tvshow.nfo')
|
||||
if filetools.isfile(tvshow_path) and item.channel_prefs:
|
||||
for channel in item.channel_prefs:
|
||||
filename = filetools.join(config.get_data_path(), "settings_channels", channel + '_data.json')
|
||||
|
||||
json_file = jsontools.load(filetools.read(filename))
|
||||
if 'TVSHOW_AUTORENUMBER' in json_file:
|
||||
json = json_file['TVSHOW_AUTORENUMBER']
|
||||
if item.fulltitle in json:
|
||||
item.channel_prefs[channel]['TVSHOW_AUTORENUMBER'] = json[item.fulltitle]
|
||||
logger.info('UPDATED=\n' + str(item.channel_prefs))
|
||||
filetools.write(tvshow_path, head_nfo + item.tojson())
|
||||
|
||||
def add_renumber_options(item, head_nfo, path):
|
||||
from core import jsontools
|
||||
# from core.support import dbg;dbg()
|
||||
ret = None
|
||||
filename = filetools.join(config.get_data_path(), "settings_channels", item.channel + '_data.json')
|
||||
json_file = jsontools.load(filetools.read(filename))
|
||||
if 'TVSHOW_AUTORENUMBER' in json_file:
|
||||
json = json_file['TVSHOW_AUTORENUMBER']
|
||||
if item.fulltitle in json:
|
||||
ret = json[item.fulltitle]
|
||||
return ret
|
||||
|
||||
def check_renumber_options(item):
|
||||
from specials.autorenumber import load, write
|
||||
for key in item.channel_prefs:
|
||||
if 'TVSHOW_AUTORENUMBER' in item.channel_prefs[key]:
|
||||
item.channel = key
|
||||
json = load(item)
|
||||
if not json or item.fulltitle not in json:
|
||||
json[item.fulltitle] = item.channel_prefs[key]['TVSHOW_AUTORENUMBER']
|
||||
write(item, json)
|
||||
|
||||
# head_nfo, tvshow_item = read_nfo(filetools.join(item.context[0]['nfo']))
|
||||
# if tvshow_item['channel_prefs'][item.fullti]
|
||||
|
||||
|
||||
def filter_list(episodelist, action=None, path=None):
|
||||
# if path: path = path.decode('utf8')
|
||||
# import xbmc
|
||||
# if xbmc.getCondVisibility('system.platform.windows') > 0: path = path.replace('smb:','').replace('/','\\')
|
||||
channel_prefs = {}
|
||||
lang_sel = quality_sel = show_title = channel =''
|
||||
# from core.support import dbg;dbg()
|
||||
if action:
|
||||
tvshow_path = filetools.join(path, "tvshow.nfo")
|
||||
head_nfo, tvshow_item = read_nfo(tvshow_path)
|
||||
@@ -253,8 +296,13 @@ def filter_list(episodelist, action=None, path=None):
|
||||
filetools.remove(filetools.join(path, File))
|
||||
if channel not in tvshow_item.channel_prefs:
|
||||
tvshow_item.channel_prefs[channel] = {}
|
||||
|
||||
channel_prefs = tvshow_item.channel_prefs[channel]
|
||||
|
||||
renumber = add_renumber_options(episodelist[0], head_nfo, tvshow_path)
|
||||
if renumber:
|
||||
channel_prefs['TVSHOW_AUTORENUMBER'] = renumber
|
||||
|
||||
if action == 'get_seasons':
|
||||
if 'favourite_language' not in channel_prefs:
|
||||
channel_prefs['favourite_language'] = ''
|
||||
@@ -418,7 +466,7 @@ def save_tvshow(item, episodelist):
|
||||
+ ' / ' + item.infoLabels['code'])
|
||||
return 0, 0, -1, path
|
||||
|
||||
if config.get_setting("original_title_folder", "videolibrary") == 1 and item.infoLabels['originaltitle']:
|
||||
if config.get_setting("original_title_folder", "videolibrary") and item.infoLabels['originaltitle']:
|
||||
base_name = item.infoLabels['originaltitle']
|
||||
elif item.infoLabels['tvshowtitle']:
|
||||
base_name = item.infoLabels['tvshowtitle']
|
||||
@@ -432,7 +480,7 @@ def save_tvshow(item, episodelist):
|
||||
else:
|
||||
base_name = filetools.validate_path(base_name.replace('/', '-'))
|
||||
|
||||
if config.get_setting("lowerize_title", "videolibrary") == 0:
|
||||
if config.get_setting("lowerize_title", "videolibrary"):
|
||||
base_name = base_name.lower()
|
||||
|
||||
for raiz, subcarpetas, ficheros in filetools.walk(TVSHOWS_PATH):
|
||||
@@ -490,7 +538,7 @@ def save_tvshow(item, episodelist):
|
||||
item_tvshow.library_filter_show = {item.channel: item.show}
|
||||
|
||||
if item.channel != "downloads":
|
||||
item_tvshow.active = 1 # para que se actualice a diario cuando se llame a videolibrary_service
|
||||
item_tvshow.active = 1 # para que se actualice a diario cuando se llame a service
|
||||
|
||||
filetools.write(tvshow_path, head_nfo + item_tvshow.tojson())
|
||||
|
||||
@@ -554,7 +602,7 @@ def save_episodes(path, episodelist, serie, silent=False, overwrite=True):
|
||||
nostrm_episodelist.append(season_episode)
|
||||
nostrm_episodelist = sorted(set(nostrm_episodelist))
|
||||
|
||||
# Silent es para no mostrar progreso (para videolibrary_service)
|
||||
# Silent es para no mostrar progreso (para service)
|
||||
if not silent:
|
||||
# progress dialog
|
||||
p_dialog = platformtools.dialog_progress(config.get_localized_string(20000), config.get_localized_string(60064))
|
||||
@@ -571,16 +619,11 @@ def save_episodes(path, episodelist, serie, silent=False, overwrite=True):
|
||||
|
||||
new_episodelist = []
|
||||
# Obtenemos el numero de temporada y episodio y descartamos los q no lo sean
|
||||
tags = []
|
||||
if config.get_setting("enable_filter", "videolibrary"):
|
||||
tags = [x.strip() for x in config.get_setting("filters", "videolibrary").lower().split(",")]
|
||||
|
||||
for e in episodelist:
|
||||
headers = {}
|
||||
if e.headers:
|
||||
headers = e.headers
|
||||
if tags != [] and tags != None and any(tag in e.title.lower() for tag in tags):
|
||||
continue
|
||||
|
||||
try:
|
||||
season_episode = scrapertools.get_season_and_episode(e.title)
|
||||
@@ -659,7 +702,7 @@ def save_episodes(path, episodelist, serie, silent=False, overwrite=True):
|
||||
json_path = filetools.join(path, ("%s [%s].json" % (season_episode, e.channel)).lower())
|
||||
|
||||
if season_episode in nostrm_episodelist:
|
||||
logger.error('Error in the structure of the Video Library: Seriese ' + serie.contentSerieName + ' ' + season_episode)
|
||||
logger.info('Skipped: Serie ' + serie.contentSerieName + ' ' + season_episode + ' available as local content')
|
||||
continue
|
||||
strm_exists = strm_path in ficheros
|
||||
nfo_exists = nfo_path in ficheros
|
||||
@@ -789,7 +832,7 @@ def save_episodes(path, episodelist, serie, silent=False, overwrite=True):
|
||||
fallidos = -1
|
||||
else:
|
||||
# ... si ha sido correcto actualizamos la videoteca de Kodi
|
||||
if config.is_xbmc() and not silent:
|
||||
if config.is_xbmc() and config.get_setting("videolibrary_kodi") and not silent:
|
||||
from platformcode import xbmc_videolibrary
|
||||
xbmc_videolibrary.update()
|
||||
|
||||
@@ -834,11 +877,11 @@ def add_movie(item):
|
||||
insertados, sobreescritos, fallidos = save_movie(new_item)
|
||||
|
||||
if fallidos == 0:
|
||||
platformtools.dialog_ok(config.get_localized_string(30131), new_item.contentTitle,
|
||||
config.get_localized_string(30135)) # 'se ha añadido a la videoteca'
|
||||
platformtools.dialog_ok(config.get_localized_string(30131),
|
||||
config.get_localized_string(30135) % new_item.contentTitle) # 'se ha añadido a la videoteca'
|
||||
else:
|
||||
platformtools.dialog_ok(config.get_localized_string(30131),
|
||||
config.get_localized_string(60066)) #"ERROR, la pelicula NO se ha añadido a la videoteca")
|
||||
config.get_localized_string(60066) % new_item.contentTitle) #"ERROR, la pelicula NO se ha añadido a la videoteca")
|
||||
|
||||
|
||||
def add_tvshow(item, channel=None):
|
||||
@@ -906,20 +949,20 @@ def add_tvshow(item, channel=None):
|
||||
insertados, sobreescritos, fallidos, path = save_tvshow(item, itemlist)
|
||||
|
||||
if not insertados and not sobreescritos and not fallidos:
|
||||
platformtools.dialog_ok(config.get_localized_string(30131), config.get_localized_string(60067))
|
||||
logger.error("The %s series could not be added to the video library. Could not get any episode" % item.show)
|
||||
platformtools.dialog_ok(config.get_localized_string(30131), config.get_localized_string(60067) % item.show)
|
||||
logger.error("La serie %s no se ha podido añadir a la videoteca. No se ha podido obtener ningun episodio" % item.show)
|
||||
|
||||
elif fallidos == -1:
|
||||
platformtools.dialog_ok(config.get_localized_string(30131), config.get_localized_string(60068))
|
||||
logger.error("The %s series could not be added to the video library" % item.show)
|
||||
platformtools.dialog_ok(config.get_localized_string(30131), config.get_localized_string(60068) % item.show)
|
||||
logger.error("La serie %s no se ha podido añadir a la videoteca" % item.show)
|
||||
|
||||
elif fallidos > 0:
|
||||
platformtools.dialog_ok(config.get_localized_string(30131), config.get_localized_string(60069))
|
||||
logger.error("Could not add %s episodes of the %s series to the video library" % (fallidos, item.show))
|
||||
platformtools.dialog_ok(config.get_localized_string(30131), config.get_localized_string(60069) % item.show)
|
||||
logger.error("No se han podido añadir %s episodios de la serie %s a la videoteca" % (fallidos, item.show))
|
||||
|
||||
else:
|
||||
platformtools.dialog_ok(config.get_localized_string(30131), config.get_localized_string(60070))
|
||||
logger.info("%s episodes of the %s series have been added to the video library" % (insertados, item.show))
|
||||
platformtools.dialog_ok(config.get_localized_string(30131), config.get_localized_string(60070) % item.show)
|
||||
logger.info("Se han añadido %s episodios de la serie %s a la videoteca" % (insertados, item.show))
|
||||
if config.is_xbmc():
|
||||
if config.get_setting("sync_trakt_new_tvshow", "videolibrary"):
|
||||
import xbmc
|
||||
|
||||
@@ -104,3 +104,14 @@ class ziptools(object):
|
||||
|
||||
dirs.sort()
|
||||
return dirs
|
||||
|
||||
def zip(self, dir, file):
|
||||
import os
|
||||
zf = zipfile.ZipFile(file, "w", zipfile.ZIP_DEFLATED)
|
||||
abs_src = os.path.abspath(dir)
|
||||
for dirname, subdirs, files in os.walk(dir):
|
||||
for filename in files:
|
||||
absname = os.path.abspath(os.path.join(dirname, filename))
|
||||
arcname = absname[len(abs_src) + 1:]
|
||||
zf.write(absname, arcname)
|
||||
zf.close()
|
||||
@@ -14,10 +14,6 @@ logger.info("init...")
|
||||
librerias = xbmc.translatePath(os.path.join(config.get_runtime_path(), 'lib'))
|
||||
sys.path.insert(0, librerias)
|
||||
|
||||
if not config.dev_mode():
|
||||
from platformcode import updater
|
||||
updater.showSavedChangelog()
|
||||
|
||||
from platformcode import launcher
|
||||
|
||||
if sys.argv[2] == "":
|
||||
|
||||
@@ -1822,11 +1822,11 @@ def redirect_clone_newpct1(item, head_nfo=None, it=None, path=False, overwrite=F
|
||||
# - patron5: expresión Regex aplicable a la url (opcional)
|
||||
# - content_inc: contenido al que aplica esta entrada, o * (item.contentType o item.extra)
|
||||
# - content_exc: contenido que se excluye de esta entrada (item.contentType) (opcional). opción para 'emerg'
|
||||
# - ow_force: indicador para la acción de "videolibrary_service.py". Puede crear la variable item.ow_force:
|
||||
# - force: indica al canal que analize toda la serie y que videolibrary_service la reescriba
|
||||
# - auto: indica a videolibrary_service que la reescriba
|
||||
# - no: no acción para videolibrary_service, solo redirige en visionado de videolibrary
|
||||
# - del: borra las estrucuturas de un determinado canal en videolibrary_service, quizás creadas por errores de un canal
|
||||
# - ow_force: indicador para la acción de "service.py". Puede crear la variable item.ow_force:
|
||||
# - force: indica al canal que analize toda la serie y que service la reescriba
|
||||
# - auto: indica a service que la reescriba
|
||||
# - no: no acción para service, solo redirige en visionado de videolibrary
|
||||
# - del: borra las estrucuturas de un determinado canal en service, quizás creadas por errores de un canal
|
||||
# - emerg: funcionalidad muy similar a la de "del". se general dinámicamente cada vez que entra un canal con el estado activado en el .json de "emergency_urls". Permite cargar las urls de emergencia en todos los elementos existentes de la Videoteca para canal afectado
|
||||
# ejemplos:
|
||||
# ('1', 'mejortorrent', 'mejortorrent1', 'http://www.mejortorrent.com/', 'https://mejortorrent1.com/', '(http.?:\/\/.*?\/)', 'http.?:\/\/.*?\/.*?-torrent.?-[^-]+-(?:[^-]+-)([^0-9]+-)', 'http.?:\/\/.*?\/.*?-torrent.?-[^-]+-(?:[^-]+-)[^0-9]+-\\d+-(Temporada-).html', 'http.?:\/\/.*?\/.*?-torrent.?-[^-]+-(?:[^-]+-)[^0-9]+-(\\d+)-', '', 'tvshow, season', '', 'force'),
|
||||
@@ -1835,7 +1835,7 @@ def redirect_clone_newpct1(item, head_nfo=None, it=None, path=False, overwrite=F
|
||||
# ('1', 'newpct1', '', '', '', '', '', '', '', '', '*', '', 'del'),
|
||||
# ('1', 'torrentrapid', 'torrentrapid', '', '', '', '', '', '', '', '*', '1 ó 2', 'emerg'),
|
||||
#
|
||||
# La llamada recibe el parámetro Item, el .nfo y los devuleve actualizados, así como opcionalmente el parámetro "overwrite· que puede forzar la reescritura de todos los archivos de la serie, y el parámetro "path" si viene de videolibrary_service. Por último, recibe opcionalmente el parámetro "lookup" si se quiere solo averigurar si habrá migración para ese título, pero sin realizarla.
|
||||
# La llamada recibe el parámetro Item, el .nfo y los devuleve actualizados, así como opcionalmente el parámetro "overwrite· que puede forzar la reescritura de todos los archivos de la serie, y el parámetro "path" si viene de service. Por último, recibe opcionalmente el parámetro "lookup" si se quiere solo averigurar si habrá migración para ese título, pero sin realizarla.
|
||||
#
|
||||
# """
|
||||
# #logger.debug(item)
|
||||
|
||||
@@ -179,13 +179,13 @@ class Client(object):
|
||||
return self.base64urlencode(self.a32_to_str(a))
|
||||
|
||||
def aes_cbc_decrypt(self, data, key):
|
||||
try:
|
||||
from Cryptodome.Cipher import AES
|
||||
decryptor = AES.new(key, AES.MODE_CBC, '\0' * 16)
|
||||
except:
|
||||
from Crypto.Cipher import AES
|
||||
decryptor = AES.new(key, AES.MODE_CBC, '\0' * 16)
|
||||
return decryptor.decrypt(data)
|
||||
from lib import pyaes
|
||||
decryptor = pyaes.AESModeOfOperationCBC(key, '\0' * 16)
|
||||
decrypted = ''
|
||||
for p in range(0, len(data), 16):
|
||||
decrypted += decryptor.decrypt(data[p:p + 16]).replace('\0', '')
|
||||
logger.info(decrypted)
|
||||
return decrypted
|
||||
|
||||
def aes_cbc_decrypt_a32(self,data, key):
|
||||
return self.str_to_a32(self.aes_cbc_decrypt(self.a32_to_str(data), self.a32_to_str(key)))
|
||||
|
||||
@@ -32,38 +32,27 @@ from .functions import *
|
||||
import xbmc, xbmcaddon
|
||||
import sys
|
||||
import os
|
||||
import traceback ### Alfa
|
||||
import traceback
|
||||
|
||||
|
||||
#__settings__ = xbmcaddon.Addon(id='script.module.libtorrent') ### Alfa
|
||||
#__version__ = __settings__.getAddonInfo('version') ### Alfa
|
||||
#__plugin__ = __settings__.getAddonInfo('name') + " v." + __version__ ### Alfa
|
||||
#__settings__ = xbmcaddon.Addon(id='plugin.video.kod') ### Alfa
|
||||
__version__ = '1.1.17' ### Alfa
|
||||
__plugin__ = "python-libtorrent v.1.1.7" ### Alfa
|
||||
#__language__ = __settings__.getLocalizedString ### Alfa
|
||||
__version__ = '1.1.17'
|
||||
__plugin__ = "python-libtorrent v.1.1.7"
|
||||
__root__ = os.path.dirname(os.path.dirname(__file__))
|
||||
|
||||
libtorrent=None
|
||||
platform = get_platform()
|
||||
#set_dirname=__settings__.getSetting('dirname') ### Alfa
|
||||
#set_dirname=os.path.join(__settings__.getAddonInfo('Path'),'lib', 'python_libtorrent') ### Alfa
|
||||
set_dirname=__root__ ### Alfa
|
||||
set_dirname=__root__
|
||||
if getSettingAsBool('custom_dirname') and set_dirname:
|
||||
log('set_dirname:' +str(set_dirname))
|
||||
dirname=set_dirname
|
||||
else:
|
||||
#dirname = os.path.join(xbmc.translatePath('special://temp'), 'xbmcup', 'script.module.libtorrent',
|
||||
# 'python_libtorrent')
|
||||
dirname=set_dirname ### Alfa
|
||||
dirname=set_dirname
|
||||
|
||||
log('dirname: ' +str(dirname))
|
||||
|
||||
#versions = ['0.16.19', '1.0.6', '1.0.7', '1.0.8', '1.0.9', '1.0.11', '1.1.0', '1.1.1', '1.1.6', '1.1.7', '1.2.2', '1.2.3'] ### Alfa
|
||||
versions = ['0.16.19', '1.0.6', '1.0.7', '1.0.8', '1.0.9', '1.0.11', '1.1.0', '1.1.1', '1.1.6', '1.1.7', '1.2.2'] ### Alfa
|
||||
#versions = ['0.16.19', '1.0.6', '1.0.7', '1.0.8', '1.0.9', '1.0.11', '1.1.0', '1.1.1', '1.1.6', '1.1.7', '1.2.2', '1.2.3']
|
||||
versions = ['0.16.19', '1.0.6', '1.0.7', '1.0.8', '1.0.9', '1.0.11', '1.1.0', '1.1.1', '1.1.6', '1.1.7', '1.2.2']
|
||||
default_path = versions[-1]
|
||||
#set_version = int(__settings__.getSetting('set_version')) ### Alfa
|
||||
set_version = 0 ### Alfa
|
||||
set_version = 0
|
||||
if getSettingAsBool('custom_version'):
|
||||
log('set_version:' +str(set_version)+' '+versions[set_version])
|
||||
platform['version'] = versions[set_version]
|
||||
@@ -101,12 +90,8 @@ if not lm.check_exist():
|
||||
xbmc.sleep(2000)
|
||||
|
||||
|
||||
#if __settings__.getSetting('plugin_name')!=__plugin__: ### Alfa
|
||||
# __settings__.setSetting('plugin_name', __plugin__) ### Alfa
|
||||
# lm.update() ### Alfa
|
||||
|
||||
log('platform: ' + str(platform))
|
||||
if platform['system'] not in ['windows', 'windows_x64']: ### Alfa
|
||||
if platform['system'] not in ['windows', 'windows_x64']:
|
||||
log('os: '+str(os.uname()))
|
||||
log_text = 'ucs4' if sys.maxunicode > 65536 else 'ucs2'
|
||||
log_text += ' x64' if sys.maxsize > 2147483647 else ' x86'
|
||||
@@ -118,18 +103,18 @@ try:
|
||||
description = ''
|
||||
libtorrent = ''
|
||||
from platformcode import config
|
||||
|
||||
|
||||
if platform['system'] in ['linux_x86', 'windows', 'windows_x64', 'linux_armv6', 'linux_armv7',
|
||||
'linux_x86_64', 'linux_mipsel_ucs2', 'linux_mipsel_ucs4',
|
||||
'linux_aarch64_ucs2', 'linux_aarch64_ucs4']: ### Alfa
|
||||
'linux_aarch64_ucs2', 'linux_aarch64_ucs4']:
|
||||
import libtorrent
|
||||
|
||||
|
||||
elif PY3 and platform['system'] not in ['android_armv7', 'android_x86']:
|
||||
import libtorrent ### Alfa
|
||||
|
||||
import libtorrent
|
||||
|
||||
elif platform['system'] in ['darwin', 'ios_arm']:
|
||||
import imp
|
||||
|
||||
|
||||
path_list = [dest_path]
|
||||
log('path_list = ' + str(path_list))
|
||||
fp, pathname, description = imp.find_module('libtorrent', path_list)
|
||||
@@ -140,12 +125,12 @@ try:
|
||||
libtorrent = imp.load_module('libtorrent', fp, pathname, description)
|
||||
finally:
|
||||
if fp: fp.close()
|
||||
|
||||
|
||||
elif platform['system'] in ['android_armv7', 'android_x86']:
|
||||
try:
|
||||
import imp
|
||||
from ctypes import CDLL
|
||||
|
||||
|
||||
dest_path=lm.android_workaround(os.path.join(xbmc.translatePath('special://xbmc/'), 'files').replace('/cache/apk/assets', ''))
|
||||
dll_path=os.path.join(dest_path, 'liblibtorrent.so')
|
||||
log('CDLL path = ' + dll_path)
|
||||
@@ -164,8 +149,8 @@ try:
|
||||
except Exception as e:
|
||||
if not PY3:
|
||||
e = unicode(str(e), "utf8", errors="replace").encode("utf8")
|
||||
config.set_setting("libtorrent_path", "", server="torrent") ### Alfa
|
||||
config.set_setting("libtorrent_error", str(e), server="torrent") ### Alfa
|
||||
config.set_setting("libtorrent_path", "", server="torrent")
|
||||
config.set_setting("libtorrent_error", str(e), server="torrent")
|
||||
log(traceback.format_exc(1))
|
||||
log('fp = ' + str(fp))
|
||||
log('pathname = ' + str(pathname))
|
||||
@@ -174,7 +159,7 @@ try:
|
||||
if fp: fp.close()
|
||||
|
||||
# If no permission in dest_path we need to go deeper on root!
|
||||
try: ### Alfa START
|
||||
try:
|
||||
sys_path = '/data/app/'
|
||||
fp = ''
|
||||
pathname = sys_path
|
||||
@@ -186,7 +171,7 @@ try:
|
||||
dialog = xbmcgui.Dialog()
|
||||
dialog.notification('KoD: '+ config.get_localizad_string(70766), config.get_localizad_string(70767), time=15000)
|
||||
config.set_setting("libtorrent_msg", 'OK', server="torrent")
|
||||
|
||||
|
||||
from core import scrapertools
|
||||
kodi_app = xbmc.translatePath('special://xbmc')
|
||||
kodi_app = scrapertools.find_single_match(kodi_app, '\/\w+\/\w+\/.*?\/(.*?)\/')
|
||||
@@ -201,10 +186,10 @@ try:
|
||||
output_cmd, error_cmd = p.communicate()
|
||||
log('Comando ROOT: %s' % str(command))
|
||||
dir_list = output_cmd.split()
|
||||
|
||||
|
||||
if not dir_list:
|
||||
raise
|
||||
|
||||
|
||||
for file in dir_list:
|
||||
if kodi_app in file:
|
||||
kodi_dir = file
|
||||
@@ -228,12 +213,12 @@ try:
|
||||
if fp: fp.close()
|
||||
else:
|
||||
import libtorrent
|
||||
|
||||
|
||||
except Exception as e:
|
||||
log('ERROR Comando ROOT: %s, %s' % (str(command), str(dest_path)))
|
||||
if not PY3:
|
||||
e = unicode(str(e), "utf8", errors="replace").encode("utf8")
|
||||
log(traceback.format_exc(1)) ### Alfa
|
||||
log(traceback.format_exc(1))
|
||||
log('fp = ' + str(fp))
|
||||
log('pathname = ' + str(pathname))
|
||||
log('description = ' + str(description))
|
||||
@@ -241,15 +226,15 @@ try:
|
||||
if fp: fp.close()
|
||||
|
||||
if libtorrent:
|
||||
config.set_setting("libtorrent_path", dest_path, server="torrent") ### Alfa
|
||||
config.set_setting("libtorrent_error", "", server="torrent") ### Alfa
|
||||
config.set_setting("libtorrent_path", dest_path, server="torrent")
|
||||
config.set_setting("libtorrent_error", "", server="torrent")
|
||||
log('Imported libtorrent v' + libtorrent.version + ' from "' + dest_path + '"')
|
||||
|
||||
except Exception as e:
|
||||
if not PY3:
|
||||
e = unicode(str(e), "utf8", errors="replace").encode("utf8")
|
||||
config.set_setting("libtorrent_path", "", server="torrent") ### Alfa
|
||||
config.set_setting("libtorrent_error", str(e), server="torrent") ### Alfa
|
||||
config.set_setting("libtorrent_path", "", server="torrent")
|
||||
config.set_setting("libtorrent_error", str(e), server="torrent")
|
||||
log('Error importing libtorrent from "' + dest_path + '". Exception: ' + str(e))
|
||||
if fp: fp.close()
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ PLUGIN_NAME = "kod"
|
||||
|
||||
__settings__ = xbmcaddon.Addon(id="plugin.video." + PLUGIN_NAME)
|
||||
__language__ = __settings__.getLocalizedString
|
||||
__version_fix = None
|
||||
__dev_mode = None
|
||||
|
||||
channels_data = list()
|
||||
|
||||
@@ -36,19 +38,25 @@ def get_addon_version(with_fix=True):
|
||||
|
||||
|
||||
def get_addon_version_fix():
|
||||
if not dev_mode():
|
||||
try:
|
||||
sha = open(os.path.join(get_runtime_path(), 'last_commit.txt')).readline()
|
||||
return sha[:7]
|
||||
except:
|
||||
return '??'
|
||||
else:
|
||||
return 'DEV'
|
||||
global __version_fix
|
||||
ret = __version_fix
|
||||
if not ret:
|
||||
if not dev_mode():
|
||||
try:
|
||||
sha = open(os.path.join(get_runtime_path(), 'last_commit.txt')).readline()
|
||||
ret = sha[:7]
|
||||
except:
|
||||
ret = '??'
|
||||
else:
|
||||
ret = 'DEV'
|
||||
return ret
|
||||
|
||||
|
||||
def dev_mode():
|
||||
r = os.path.isdir(get_runtime_path() + '/.git')
|
||||
return r
|
||||
global __dev_mode
|
||||
if not __dev_mode:
|
||||
__dev_mode = os.path.isdir(get_runtime_path() + '/.git')
|
||||
return __dev_mode
|
||||
|
||||
|
||||
def get_platform(full_version=False):
|
||||
@@ -152,6 +160,7 @@ def enable_disable_autorun(is_enabled):
|
||||
if is_enabled is False:
|
||||
with open(path, append_write) as file:
|
||||
file.write("import xbmc\nxbmc.executebuiltin('XBMC.RunAddon(plugin.video.kod)')")
|
||||
set_setting('autostart', 'On')
|
||||
else:
|
||||
file = open(path, "r")
|
||||
old_content = file.read()
|
||||
@@ -159,6 +168,7 @@ def enable_disable_autorun(is_enabled):
|
||||
file.close()
|
||||
with open(path, "w") as file:
|
||||
file.write(new_content)
|
||||
set_setting('autostart', 'Off')
|
||||
return True
|
||||
|
||||
def get_all_settings_addon():
|
||||
@@ -170,7 +180,7 @@ def get_all_settings_addon():
|
||||
infile.close()
|
||||
|
||||
ret = {}
|
||||
matches = scrapertools.find_multiple_matches(data, '<setting id="([^"]*)" value="([^"]*)')
|
||||
matches = scrapertools.find_multiple_matches(data, '<setting id=\"([^\"]+)\"[^>]*>([^<]*)</setting>')
|
||||
|
||||
for _id, value in matches:
|
||||
ret[_id] = get_setting(_id)
|
||||
@@ -217,19 +227,25 @@ def open_settings():
|
||||
set_setting('adult_aux_new_password1', '')
|
||||
set_setting('adult_aux_new_password2', '')
|
||||
|
||||
from specials import videolibrary
|
||||
from platformcode import xbmc_videolibrary
|
||||
if settings_pre.get('downloadpath', None) != settings_post.get('downloadpath', None):
|
||||
xbmc_videolibrary.update_sources(settings_post.get('downloadpath', None), settings_pre.get('downloadpath', None))
|
||||
|
||||
# si se ha cambiado la ruta de la videoteca llamamos a comprobar directorios para que lo cree y pregunte
|
||||
# automaticamente si configurar la videoteca
|
||||
if settings_pre.get("videolibrarypath", None) != settings_post.get("videolibrarypath", None) or \
|
||||
settings_pre.get("folder_movies", None) != settings_post.get("folder_movies", None) or \
|
||||
settings_pre.get("folder_tvshows", None) != settings_post.get("folder_tvshows", None):
|
||||
verify_directories_created()
|
||||
settings_pre.get("folder_movies", None) != settings_post.get("folder_movies", None) or \
|
||||
settings_pre.get("folder_tvshows", None) != settings_post.get("folder_tvshows", None):
|
||||
videolibrary.move_videolibrary(settings_pre.get("videolibrarypath", None), settings_post.get("videolibrarypath", None),
|
||||
settings_pre.get("folder_movies", None), settings_post.get("folder_movies", None),
|
||||
settings_pre.get("folder_tvshows", None), settings_post.get("folder_tvshows", None))
|
||||
|
||||
else:
|
||||
# si se ha puesto que se quiere autoconfigurar y se había creado el directorio de la videoteca
|
||||
if not settings_pre.get("videolibrary_kodi", None) and settings_post.get("videolibrary_kodi", None) \
|
||||
and settings_post.get("videolibrary_kodi_flag", None) == 1:
|
||||
from platformcode import xbmc_videolibrary
|
||||
xbmc_videolibrary.ask_set_content(2, silent=True)
|
||||
# si se ha puesto que se quiere autoconfigurar y se había creado el directorio de la videoteca
|
||||
if not settings_pre.get("videolibrary_kodi", None) and settings_post.get("videolibrary_kodi", None):
|
||||
xbmc_videolibrary.ask_set_content(silent=True)
|
||||
elif settings_pre.get("videolibrary_kodi", None) and not settings_post.get("videolibrary_kodi", None):
|
||||
xbmc_videolibrary.clean(get_setting('videolibrarypath'))
|
||||
|
||||
|
||||
def get_setting(name, channel="", server="", default=None):
|
||||
@@ -378,8 +394,10 @@ def get_localized_string(code):
|
||||
def get_localized_category(categ):
|
||||
categories = {'movie': get_localized_string(30122), 'tvshow': get_localized_string(30123),
|
||||
'anime': get_localized_string(30124), 'documentary': get_localized_string(30125),
|
||||
'vos': get_localized_string(30136), 'sub-ita': get_localized_string(70566), 'adult': get_localized_string(30126),
|
||||
'direct': get_localized_string(30137), 'torrent': get_localized_string(70015), 'live': get_localized_string(30138)}
|
||||
'vos': get_localized_string(30136), 'sub-ita': get_localized_string(70566),
|
||||
'adult': get_localized_string(30126), 'direct': get_localized_string(30137),
|
||||
'torrent': get_localized_string(70015), 'live': get_localized_string(30138),
|
||||
'music': get_localized_string(30139) }
|
||||
return categories[categ] if categ in categories else categ
|
||||
|
||||
|
||||
@@ -463,8 +481,8 @@ def verify_directories_created():
|
||||
logger.debug("Creating %s: %s" % (path, saved_path))
|
||||
filetools.mkdir(saved_path)
|
||||
|
||||
config_paths = [["folder_movies", "CINE"],
|
||||
["folder_tvshows", "SERIES"]]
|
||||
config_paths = [["folder_movies", "Film"],
|
||||
["folder_tvshows", "Serie TV"]]
|
||||
|
||||
for path, default in config_paths:
|
||||
saved_path = get_setting(path)
|
||||
@@ -480,6 +498,10 @@ def verify_directories_created():
|
||||
# si se crea el directorio
|
||||
filetools.mkdir(content_path)
|
||||
|
||||
from platformcode import xbmc_videolibrary
|
||||
xbmc_videolibrary.update_sources(get_setting("videolibrarypath"))
|
||||
xbmc_videolibrary.update_sources(get_setting("downloadpath"))
|
||||
|
||||
try:
|
||||
from core import scrapertools
|
||||
# Buscamos el archivo addon.xml del skin activo
|
||||
|
||||
@@ -28,36 +28,36 @@ def init():
|
||||
|
||||
"""
|
||||
Todo el código añadido al add-on se borra con cada actualización. Esta función permite restaurarlo automáticamente con cada actualización. Esto permite al usuario tener su propio código, bajo su responsabilidad, y restaurarlo al add-on cada vez que se actualiza.
|
||||
|
||||
|
||||
El mecanismo funciona copiando el contenido de la carpeta-arbol "./userdata/addon_data/plugin.video.kod/custom_code/..." sobre
|
||||
las carpetas de código del add-on. No verifica el contenido, solo vuelca(reemplaza) el contenido de "custom_code".
|
||||
|
||||
|
||||
El usuario almacenará en las subcarpetas de "custom_code" su código actualizado y listo para ser copiado en cualquier momento.
|
||||
Si no se desea que copie algo, simplemente se borra de "custom_code" y ya no se copiará en la próxima actualización.
|
||||
|
||||
|
||||
Los pasos que sigue esta función, son los siguientes:
|
||||
|
||||
1.- La función se llama desde videolibrary_service.py, desde la función inicial:
|
||||
|
||||
1.- La función se llama desde service.py, desde la función inicial:
|
||||
# Copia Custom code a las carpetas de Alfa desde la zona de Userdata
|
||||
from platformcode import custom_code
|
||||
custom_code.init()
|
||||
|
||||
2.- En el inicio de Kodi, comprueba si existe la carpeta "custom_code" en "./userdata/addon_data/plugin.video.kod/".
|
||||
Si no existe, la crea y sale sin más, dando al ususario la posibilidad de copiar sobre esa estructura su código,
|
||||
|
||||
2.- En el inicio de Kodi, comprueba si existe la carpeta "custom_code" en "./userdata/addon_data/plugin.video.kod/".
|
||||
Si no existe, la crea y sale sin más, dando al ususario la posibilidad de copiar sobre esa estructura su código,
|
||||
y que la función la vuelque sobre el add-on en el próximo inicio de Kodi.
|
||||
|
||||
|
||||
3.- En el siguiente inicio de Kodi, comprueba si existe el custom_code.json en la carpeta root del add-on.
|
||||
Si no existe, lo crea con el número de versión del add-on vacío, para permitir que se copien los archivos en esta pasada.
|
||||
|
||||
4.- Verifica que el número de versión del add-on es diferente de el de custom_code.json. Si es la misma versión,
|
||||
|
||||
4.- Verifica que el número de versión del add-on es diferente de el de custom_code.json. Si es la misma versión,
|
||||
se sale porque ya se realizo la copia anteriormente.
|
||||
Si la versión es distinta, se realiza el volcado de todos los archivos de la carpeta-árbol "custom_code" sobre el add-on.
|
||||
Si la carpeta de destino no existe, dará un error y se cancelará la copia. Se considera que no tienen sentido nuevas carpetas.
|
||||
|
||||
|
||||
5.- Si la copia ha terminado con éxito, se actualiza el custom_code.json con el número de versión del add-on,
|
||||
para que en inicios sucesivos de Kodi no se realicen las copias, hasta que el add-on cambie de versión.
|
||||
En el número de versión del add-on no se considera el número de fix.
|
||||
|
||||
|
||||
Tiempos: Copiando 7 archivos de prueba, el proceso ha tardado una décima de segundo.
|
||||
"""
|
||||
|
||||
@@ -65,47 +65,47 @@ def init():
|
||||
#Borra el .zip de instalación de Alfa de la carpeta Packages, por si está corrupto, y que así se pueda descargar de nuevo
|
||||
version = 'plugin.video.kod-%s.zip' % config.get_addon_version(with_fix=False)
|
||||
filetools.remove(filetools.join(xbmc.translatePath('special://home'), 'addons', 'packages', version), True)
|
||||
|
||||
|
||||
#Verifica si Kodi tiene algún achivo de Base de Datos de Vídeo de versiones anteriores, entonces los borra
|
||||
verify_Kodi_video_DB()
|
||||
|
||||
|
||||
#LIBTORRENT: se descarga el binario de Libtorrent cada vez que se actualiza Alfa
|
||||
try:
|
||||
threading.Thread(target=update_libtorrent).start() # Creamos un Thread independiente, hasta el fin de Kodi
|
||||
time.sleep(2) # Dejamos terminar la inicialización...
|
||||
except: # Si hay problemas de threading, nos vamos
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
#QUASAR: Preguntamos si se hacen modificaciones a Quasar
|
||||
if not filetools.exists(filetools.join(config.get_data_path(), "quasar.json")) \
|
||||
and not config.get_setting('addon_quasar_update', default=False):
|
||||
question_update_external_addon("quasar")
|
||||
|
||||
#QUASAR: Hacemos las modificaciones a Quasar, si está permitido, y si está instalado
|
||||
if config.get_setting('addon_quasar_update', default=False) or \
|
||||
(filetools.exists(filetools.join(config.get_data_path(), \
|
||||
"quasar.json")) and not xbmc.getCondVisibility('System.HasAddon("plugin.video.quasar")')):
|
||||
if not update_external_addon("quasar"):
|
||||
platformtools.dialog_notification("Actualización Quasar", "Ha fallado. Consulte el log")
|
||||
|
||||
|
||||
# #QUASAR: Preguntamos si se hacen modificaciones a Quasar
|
||||
# if not filetools.exists(filetools.join(config.get_data_path(), "quasar.json")) \
|
||||
# and not config.get_setting('addon_quasar_update', default=False):
|
||||
# question_update_external_addon("quasar")
|
||||
|
||||
# #QUASAR: Hacemos las modificaciones a Quasar, si está permitido, y si está instalado
|
||||
# if config.get_setting('addon_quasar_update', default=False) or \
|
||||
# (filetools.exists(filetools.join(config.get_data_path(), \
|
||||
# "quasar.json")) and not xbmc.getCondVisibility('System.HasAddon("plugin.video.quasar")')):
|
||||
# if not update_external_addon("quasar"):
|
||||
# platformtools.dialog_notification("Actualización Quasar", "Ha fallado. Consulte el log")
|
||||
|
||||
#Existe carpeta "custom_code" ? Si no existe se crea y se sale
|
||||
custom_code_dir = filetools.join(config.get_data_path(), 'custom_code')
|
||||
if not filetools.exists(custom_code_dir):
|
||||
create_folder_structure(custom_code_dir)
|
||||
return
|
||||
|
||||
|
||||
else:
|
||||
#Existe "custom_code.json" ? Si no existe se crea
|
||||
custom_code_json_path = config.get_runtime_path()
|
||||
custom_code_json = filetools.join(custom_code_json_path, 'custom_code.json')
|
||||
if not filetools.exists(custom_code_json):
|
||||
create_json(custom_code_json_path)
|
||||
|
||||
|
||||
#Se verifica si la versión del .json y del add-on son iguales. Si es así se sale. Si no se copia "custom_code" al add-on
|
||||
verify_copy_folders(custom_code_dir, custom_code_json_path)
|
||||
except:
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
|
||||
|
||||
def create_folder_structure(custom_code_dir):
|
||||
logger.info()
|
||||
@@ -130,18 +130,18 @@ def create_json(custom_code_json_path, json_name=json_data_file_name):
|
||||
if filetools.exists(json_data_file):
|
||||
filetools.remove(json_data_file)
|
||||
result = filetools.write(json_data_file, jsontools.dump({"addon_version": ""}))
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
def verify_copy_folders(custom_code_dir, custom_code_json_path):
|
||||
logger.info()
|
||||
|
||||
|
||||
#verificamos si es una nueva versión de Alfa instalada o era la existente. Si es la existente, nos vamos sin hacer nada
|
||||
json_data_file = filetools.join(custom_code_json_path, json_data_file_name)
|
||||
json_data = jsontools.load(filetools.read(json_data_file))
|
||||
current_version = config.get_addon_version(with_fix=False)
|
||||
if not json_data or not 'addon_version' in json_data:
|
||||
if not json_data or not 'addon_version' in json_data:
|
||||
create_json(custom_code_json_path)
|
||||
json_data = jsontools.load(filetools.read(json_data_file))
|
||||
try:
|
||||
@@ -149,7 +149,7 @@ def verify_copy_folders(custom_code_dir, custom_code_json_path):
|
||||
return
|
||||
except:
|
||||
logger.error(traceback.format_exc(1))
|
||||
|
||||
|
||||
#Ahora copiamos los archivos desde el área de Userdata, Custom_code, sobre las carpetas del add-on
|
||||
for root, folders, files in filetools.walk(custom_code_dir):
|
||||
for file in files:
|
||||
@@ -157,46 +157,46 @@ def verify_copy_folders(custom_code_dir, custom_code_json_path):
|
||||
output_file = input_file.replace(custom_code_dir, custom_code_json_path)
|
||||
if not filetools.copy(input_file, output_file, silent=True):
|
||||
return
|
||||
|
||||
|
||||
#Guardamaos el json con la versión actual de Alfa, para no volver a hacer la copia hasta la nueva versión
|
||||
json_data['addon_version'] = current_version
|
||||
filetools.write(json_data_file, jsontools.dump(json_data))
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
def question_update_external_addon(addon_name):
|
||||
logger.info(addon_name)
|
||||
|
||||
|
||||
#Verificamos que el addon está instalado
|
||||
stat = False
|
||||
if xbmc.getCondVisibility('System.HasAddon("plugin.video.%s")' % addon_name):
|
||||
#Si es la primera vez que se pregunta por la actualización del addon externo, recogemos la respuesta,
|
||||
#Si es la primera vez que se pregunta por la actualización del addon externo, recogemos la respuesta,
|
||||
# guardaos un .json en userdat/alfa para no volver a preguntar otra vez, y se actualiza el setting en Alfa.
|
||||
stat = platformtools.dialog_yesno('Actualización de %s' % addon_name.capitalize(), '¿Quiere que actualicemos Quasar para que sea compatible con las últimas versiones de Kodi? (recomendado: SÍ)', '', 'Si actualiza Quasar, reinicie Kodi en un par de minutos')
|
||||
|
||||
#Con la respuesta actualizamos la variable en Alfa settings.xml. Se puede cambiar en Ajustes de Alfa, Otros
|
||||
if stat:
|
||||
config.set_setting('addon_quasar_update', True)
|
||||
else:
|
||||
config.set_setting('addon_quasar_update', False)
|
||||
|
||||
# if stat:
|
||||
# config.set_setting('addon_quasar_update', True)
|
||||
# else:
|
||||
# config.set_setting('addon_quasar_update', False)
|
||||
|
||||
#Creamos un .json en userdata para no volver a preguntar otra vez
|
||||
create_json(config.get_data_path(), "%s.json" % addon_name)
|
||||
|
||||
|
||||
return stat
|
||||
|
||||
|
||||
def update_external_addon(addon_name):
|
||||
logger.info(addon_name)
|
||||
|
||||
|
||||
try:
|
||||
#Verificamos que el addon está instalado
|
||||
if xbmc.getCondVisibility('System.HasAddon("plugin.video.%s")' % addon_name):
|
||||
#Path de actualizaciones de Alfa
|
||||
alfa_addon_updates_mig = filetools.join(config.get_runtime_path(), "lib")
|
||||
alfa_addon_updates = filetools.join(alfa_addon_updates_mig, addon_name)
|
||||
|
||||
|
||||
#Path de destino en addon externo
|
||||
__settings__ = xbmcaddon.Addon(id="plugin.video." + addon_name)
|
||||
if addon_name.lower() in ['quasar', 'elementum']:
|
||||
@@ -206,7 +206,7 @@ def update_external_addon(addon_name):
|
||||
else:
|
||||
addon_path_mig = ''
|
||||
addon_path = ''
|
||||
|
||||
|
||||
#Hay modificaciones en Alfa? Las copiamos al addon, incuidas las carpetas de migración a PY3
|
||||
if filetools.exists(alfa_addon_updates) and filetools.exists(addon_path):
|
||||
for root, folders, files in filetools.walk(alfa_addon_updates_mig):
|
||||
@@ -222,7 +222,7 @@ def update_external_addon(addon_name):
|
||||
if not filetools.copy(input_file, output_file, silent=True):
|
||||
logger.error('Error en la copia de MIGRACIÓN: Input: %s o Output: %s' % (input_file, output_file))
|
||||
return False
|
||||
|
||||
|
||||
for root, folders, files in filetools.walk(alfa_addon_updates):
|
||||
for file in files:
|
||||
input_file = filetools.join(root, file)
|
||||
@@ -241,13 +241,13 @@ def update_external_addon(addon_name):
|
||||
return True
|
||||
except:
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
|
||||
return False
|
||||
|
||||
|
||||
|
||||
|
||||
def update_libtorrent():
|
||||
logger.info()
|
||||
|
||||
|
||||
if not config.get_setting("mct_buffer", server="torrent", default=""):
|
||||
default = config.get_setting("torrent_client", server="torrent", default=0)
|
||||
config.set_setting("torrent_client", default, server="torrent")
|
||||
@@ -261,10 +261,10 @@ def update_libtorrent():
|
||||
config.set_setting("bt_download_path", config.get_setting("downloadpath"), server="torrent")
|
||||
config.set_setting("mct_download_limit", "", server="torrent")
|
||||
config.set_setting("magnet2torrent", False, server="torrent")
|
||||
|
||||
|
||||
if not filetools.exists(filetools.join(config.get_runtime_path(), "custom_code.json")) or not \
|
||||
config.get_setting("unrar_path", server="torrent", default=""):
|
||||
|
||||
|
||||
path = filetools.join(config.get_runtime_path(), 'lib', 'rarfiles')
|
||||
creationflags = ''
|
||||
sufix = ''
|
||||
@@ -293,7 +293,7 @@ def update_libtorrent():
|
||||
filetools.mkdir(unrar)
|
||||
unrar = filetools.join(unrar, 'unrar')
|
||||
filetools.copy(unrar_org, unrar, silent=True)
|
||||
|
||||
|
||||
command = ['chmod', '777', '%s' % unrar]
|
||||
p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
output_cmd, error_cmd = p.communicate()
|
||||
@@ -322,14 +322,14 @@ def update_libtorrent():
|
||||
xbmc.log('######## UnRAR ERROR in module %s: %s' % (device, unrar), xbmc.LOGNOTICE)
|
||||
logger.error(traceback.format_exc(1))
|
||||
unrar = ''
|
||||
|
||||
|
||||
if unrar: config.set_setting("unrar_path", unrar, server="torrent")
|
||||
|
||||
if filetools.exists(filetools.join(config.get_runtime_path(), "custom_code.json")) and \
|
||||
config.get_setting("libtorrent_path", server="torrent", default="") :
|
||||
return
|
||||
|
||||
|
||||
|
||||
try:
|
||||
from lib.python_libtorrent.python_libtorrent import get_libtorrent
|
||||
except Exception as e:
|
||||
@@ -339,18 +339,18 @@ def update_libtorrent():
|
||||
config.set_setting("libtorrent_path", "", server="torrent")
|
||||
if not config.get_setting("libtorrent_error", server="torrent", default=''):
|
||||
config.set_setting("libtorrent_error", str(e), server="torrent")
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
def verify_Kodi_video_DB():
|
||||
logger.info()
|
||||
import random
|
||||
|
||||
|
||||
platform = {}
|
||||
path = ''
|
||||
db_files = []
|
||||
|
||||
|
||||
try:
|
||||
path = filetools.join(xbmc.translatePath("special://masterprofile/"), "Database")
|
||||
if filetools.exists(path):
|
||||
@@ -365,16 +365,16 @@ def verify_Kodi_video_DB():
|
||||
randnum = str(random.randrange(1, 999999))
|
||||
filetools.rename(filetools.join(path, file), 'OLD_' + randnum +'_' + file)
|
||||
logger.error('BD obsoleta: ' + file)
|
||||
|
||||
|
||||
else:
|
||||
logger.error('Video_DB: ' + str(platform['video_db']) + ' para versión Kodi ' + str(platform['num_version']) + ' NO EXISTE. Analizar carpeta: ' + str(db_files))
|
||||
else:
|
||||
logger.error('Estructura de get_platform(full_version=True) incorrecta')
|
||||
else:
|
||||
logger.error('Path a Userdata/Database (' + path + ') no encontrado')
|
||||
|
||||
|
||||
except:
|
||||
logger.error('Platform: ' + str(platform) + ' / Path: ' + str(path) + ' / Files: ' + str(db_files))
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
|
||||
return
|
||||
@@ -51,10 +51,10 @@ def download_and_play(url, file_name, download_path):
|
||||
|
||||
while not cancelled and download_thread.isAlive():
|
||||
dialog.update(download_thread.get_progress(), config.get_localized_string(60313),
|
||||
"Velocidad: " + str(int(old_div(download_thread.get_speed(), 1024))) + " KB/s " + str(
|
||||
download_thread.get_actual_size()) + "MB de " + str(
|
||||
config.get_localized_string(60314) + str(int(old_div(download_thread.get_speed(), 1024))) + " KB/s " + str(
|
||||
download_thread.get_actual_size()) + config.get_localized_string(60316) + str(
|
||||
download_thread.get_total_size()) + "MB",
|
||||
"Tiempo restante: " + str(downloadtools.sec_to_hms(download_thread.get_remaining_time())))
|
||||
config.get_localized_string(60202) % (str(downloadtools.sec_to_hms(download_thread.get_remaining_time()))))
|
||||
xbmc.sleep(1000)
|
||||
|
||||
if dialog.iscanceled():
|
||||
@@ -296,7 +296,7 @@ class DownloadThread(threading.Thread):
|
||||
logger.info("Detectado fichero force_stop, se interrumpe la descarga")
|
||||
f.close()
|
||||
|
||||
xbmc.executebuiltin((u'XBMC.Notification("Cancelado", "Descarga en segundo plano cancelada", 300)'))
|
||||
xbmc.executebuiltin("XBMC.Notification(%s,%s,300)" % (config.get_localized_string(60319),config.get_localized_string(60320)))
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -17,13 +17,7 @@ else:
|
||||
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
from core import channeltools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import videolibrarytools
|
||||
from core import trakt_tools
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from platformcode import platformtools
|
||||
@@ -47,14 +41,23 @@ def start():
|
||||
from specials.checkhost import test_conn
|
||||
import threading
|
||||
threading.Thread(target=test_conn, args=(True, not config.get_setting('resolver_dns'), True, [], [], True)).start()
|
||||
|
||||
|
||||
if not config.dev_mode():
|
||||
from platformcode import updater
|
||||
updater.showSavedChangelog()
|
||||
|
||||
def run(item=None):
|
||||
logger.info()
|
||||
if not item:
|
||||
# Extract item from sys.argv
|
||||
if sys.argv[2]:
|
||||
item = Item().fromurl(sys.argv[2])
|
||||
|
||||
sp = sys.argv[2].split('&')
|
||||
url = sp[0]
|
||||
item = Item().fromurl(url)
|
||||
if len(sp) > 1:
|
||||
for e in sp[1:]:
|
||||
key, val = e.split('=')
|
||||
item.__setattr__(key, val)
|
||||
# If no item, this is mainlist
|
||||
else:
|
||||
if config.get_setting("start_page"):
|
||||
@@ -84,7 +87,7 @@ def run(item=None):
|
||||
item = Item(channel="channelselector", action="getmainlist", viewmode="movie")
|
||||
if not config.get_setting('show_once'):
|
||||
from platformcode import xbmc_videolibrary
|
||||
xbmc_videolibrary.ask_set_content(1, config.get_setting('videolibrary_kodi_force'))
|
||||
xbmc_videolibrary.ask_set_content(silent=False)
|
||||
config.set_setting('show_once', True)
|
||||
|
||||
logger.info(item.tostring())
|
||||
@@ -162,6 +165,7 @@ def run(item=None):
|
||||
else:
|
||||
# Entry point for a channel is the "mainlist" action, so here we check parental control
|
||||
if item.action == "mainlist":
|
||||
from core import channeltools
|
||||
#updater.checkforupdates() beta version checking for update, still disabled
|
||||
|
||||
# Parental control
|
||||
@@ -207,6 +211,7 @@ def run(item=None):
|
||||
if item.action == "play":
|
||||
#define la info para trakt
|
||||
try:
|
||||
from core import trakt_tools
|
||||
trakt_tools.set_trakt_info(item)
|
||||
except:
|
||||
pass
|
||||
@@ -241,6 +246,7 @@ def run(item=None):
|
||||
|
||||
# Special action for findvideos, where the plugin looks for known urls
|
||||
elif item.action == "findvideos":
|
||||
from core import servertools
|
||||
|
||||
# First checks if channel has a "findvideos" function
|
||||
if hasattr(channel, 'findvideos'):
|
||||
@@ -263,10 +269,12 @@ def run(item=None):
|
||||
|
||||
# Special action for adding a movie to the library
|
||||
elif item.action == "add_pelicula_to_library":
|
||||
from core import videolibrarytools
|
||||
videolibrarytools.add_movie(item)
|
||||
|
||||
# Special action for adding a serie to the library
|
||||
elif item.action == "add_serie_to_library":
|
||||
from core import videolibrarytools
|
||||
videolibrarytools.add_tvshow(item, channel)
|
||||
|
||||
# Special action for downloading all episodes from a serie
|
||||
@@ -279,6 +287,7 @@ def run(item=None):
|
||||
# Special action for searching, first asks for the words then call the "search" function
|
||||
elif item.action == "search":
|
||||
logger.info("item.action=%s" % item.action.upper())
|
||||
from core import channeltools
|
||||
|
||||
# last_search = ""
|
||||
# last_search_active = config.get_setting("last_search", "search")
|
||||
@@ -315,6 +324,7 @@ def run(item=None):
|
||||
logger.info("Executing channel '%s' method" % item.action)
|
||||
itemlist = getattr(channel, item.action)(item)
|
||||
if config.get_setting('trakt_sync'):
|
||||
from core import trakt_tools
|
||||
token_auth = config.get_setting("token_trakt", "trakt")
|
||||
if not token_auth:
|
||||
trakt_tools.auth_trakt()
|
||||
@@ -346,6 +356,8 @@ def run(item=None):
|
||||
platformtools.dialog_ok(config.get_localized_string(20000), config.get_localized_string(30051) % e.code)
|
||||
except WebErrorException as e:
|
||||
import traceback
|
||||
from core import scrapertools
|
||||
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
patron = 'File "' + os.path.join(config.get_runtime_path(), "channels", "").replace("\\", "\\\\") + '([^.]+)\.py"'
|
||||
@@ -356,6 +368,8 @@ def run(item=None):
|
||||
config.get_localized_string(60013) %(e))
|
||||
except:
|
||||
import traceback
|
||||
from core import scrapertools
|
||||
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
patron = 'File "' + os.path.join(config.get_runtime_path(), "channels", "").replace("\\", "\\\\") + '([^.]+)\.py"'
|
||||
@@ -467,6 +481,7 @@ def play_from_library(item):
|
||||
@type item: item
|
||||
@param item: elemento con información
|
||||
"""
|
||||
item.fromLibrary = True
|
||||
logger.info()
|
||||
# logger.debug("item: \n" + item.tostring('\n'))
|
||||
|
||||
@@ -503,7 +518,7 @@ def play_from_library(item):
|
||||
item.show_server = True
|
||||
|
||||
from specials import videolibrary, autoplay
|
||||
p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(70004))
|
||||
p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(60683))
|
||||
p_dialog.update(0, '')
|
||||
|
||||
itemlist = videolibrary.findvideos(item)
|
||||
|
||||
@@ -45,8 +45,7 @@ except:
|
||||
|
||||
try:
|
||||
DOWNLOAD_PATH = ''
|
||||
DOWNLOAD_PATH = xbmc.translatePath(config.get_setting("mct_download_path", \
|
||||
server="torrent", default=config.get_setting("downloadpath")))
|
||||
DOWNLOAD_PATH = xbmc.translatePath(config.get_setting("mct_download_path", server="torrent", default=config.get_setting("torrent_downloadpath")))
|
||||
except:
|
||||
DOWNLOAD_PATH = config.get_setting("mct_download_path", server="torrent", default=config.get_setting("downloadpath"))
|
||||
if not config.get_setting("mct_download_path", server="torrent") and DOWNLOAD_PATH:
|
||||
@@ -573,7 +572,7 @@ def play(url, xlistitem={}, is_view=None, subtitle="", password="", item=None):
|
||||
ok = xbmcgui.Dialog().yesno(msg_header, config.get_localized_string(30031), config.get_localized_string(30032))
|
||||
else: ok = True
|
||||
# -- NO ---------------------------------------------
|
||||
if not ok:
|
||||
if ok:
|
||||
is_view=None
|
||||
bkg_user = True
|
||||
dp_cerrado = False
|
||||
@@ -614,7 +613,7 @@ def play(url, xlistitem={}, is_view=None, subtitle="", password="", item=None):
|
||||
dp.close()
|
||||
# Preguntamos si el usuario quiere pasar a backgroung
|
||||
dialog = xbmcgui.Dialog().yesno(msg_header, config.get_localized_string(30031), config.get_localized_string(30032))
|
||||
if not dialog:
|
||||
if dialog:
|
||||
bkg_user = True
|
||||
dp_cerrado = False
|
||||
dp = xbmcgui.DialogProgressBG()
|
||||
|
||||
@@ -47,10 +47,17 @@ class XBMCPlayer(xbmc.Player):
|
||||
|
||||
xbmc_player = XBMCPlayer()
|
||||
|
||||
def makeMessage(line1, line2, line3):
|
||||
message = line1
|
||||
if line2:
|
||||
message += '\n' + line2
|
||||
if line3:
|
||||
message += '\n' + line3
|
||||
return message
|
||||
|
||||
def dialog_ok(heading, line1, line2="", line3=""):
|
||||
dialog = xbmcgui.Dialog()
|
||||
return dialog.ok(heading, line1, line2, line3)
|
||||
return dialog.ok(heading, makeMessage(line1, line2, line3))
|
||||
|
||||
|
||||
def dialog_notification(heading, message, icon=0, time=5000, sound=True):
|
||||
@@ -62,12 +69,19 @@ def dialog_notification(heading, message, icon=0, time=5000, sound=True):
|
||||
dialog_ok(heading, message)
|
||||
|
||||
|
||||
def dialog_yesno(heading, line1, line2="", line3="", nolabel="No", yeslabel="Si", autoclose=""):
|
||||
def dialog_yesno(heading, line1, line2="", line3="", nolabel="No", yeslabel="Si", autoclose=0, customlabel=None):
|
||||
# customlabel only on kodi 19
|
||||
dialog = xbmcgui.Dialog()
|
||||
if autoclose:
|
||||
return dialog.yesno(heading, line1, line2, line3, nolabel, yeslabel, autoclose)
|
||||
if config.get_platform() == 'kodi-matrix':
|
||||
if autoclose:
|
||||
return dialog.yesno(heading, makeMessage(line1, line2, line3), nolabel=nolabel, yeslabel=yeslabel, customlabel=customlabel, autoclose=autoclose)
|
||||
else:
|
||||
return dialog.yesno(heading, makeMessage(line1, line2, line3), nolabel=nolabel, yeslabel=yeslabel, customlabel=customlabel)
|
||||
else:
|
||||
return dialog.yesno(heading, line1, line2, line3, nolabel, yeslabel)
|
||||
if autoclose:
|
||||
return dialog.yesno(heading, makeMessage(line1, line2, line3), nolabel=nolabel, yeslabel=yeslabel, autoclose=autoclose)
|
||||
else:
|
||||
return dialog.yesno(heading, makeMessage(line1, line2, line3), nolabel=nolabel, yeslabel=yeslabel)
|
||||
|
||||
|
||||
def dialog_select(heading, _list):
|
||||
@@ -80,7 +94,7 @@ def dialog_multiselect(heading, _list, autoclose=0, preselect=[], useDetails=Fal
|
||||
|
||||
def dialog_progress(heading, line1, line2=" ", line3=" "):
|
||||
dialog = xbmcgui.DialogProgress()
|
||||
dialog.create(heading, line1, line2, line3)
|
||||
dialog.create(heading, makeMessage(line1, line2, line3))
|
||||
return dialog
|
||||
|
||||
|
||||
@@ -112,6 +126,12 @@ def dialog_textviewer(heading, text): # disponible a partir de kodi 16
|
||||
return xbmcgui.Dialog().textviewer(heading, text)
|
||||
|
||||
|
||||
def dialog_browse(_type, heading, default=""):
|
||||
dialog = xbmcgui.Dialog()
|
||||
d = dialog.browse(_type, heading, 'files')
|
||||
return d
|
||||
|
||||
|
||||
def itemlist_refresh():
|
||||
xbmc.executebuiltin("Container.Refresh")
|
||||
|
||||
@@ -124,6 +144,139 @@ def itemlist_update(item, replace=False):
|
||||
|
||||
|
||||
def render_items(itemlist, parent_item):
|
||||
"""
|
||||
Function used to render itemlist on kodi
|
||||
"""
|
||||
logger.info('START render_items')
|
||||
thumb_type = config.get_setting('video_thumbnail_type')
|
||||
from specials import shortcuts
|
||||
from core import httptools
|
||||
_handle = int(sys.argv[1])
|
||||
default_fanart = config.get_fanart()
|
||||
def_context_commands = shortcuts.context()
|
||||
|
||||
# for adding extendedinfo to contextual menu, if it's used
|
||||
has_extendedinfo = xbmc.getCondVisibility('System.HasAddon(script.extendedinfo)')
|
||||
# for adding superfavourites to contextual menu, if it's used
|
||||
sf_file_path = xbmc.translatePath("special://home/addons/plugin.program.super.favourites/LaunchSFMenu.py")
|
||||
check_sf = os.path.exists(sf_file_path)
|
||||
superfavourites = check_sf and xbmc.getCondVisibility('System.HasAddon("plugin.program.super.favourites")')
|
||||
|
||||
# if it's not a list, do nothing
|
||||
if not isinstance(itemlist, list):
|
||||
return
|
||||
# if there's no item, add "no elements" item
|
||||
if not len(itemlist):
|
||||
itemlist.append(Item(title=config.get_localized_string(60347), thumbnail=get_thumb('nofolder.png')))
|
||||
|
||||
for item in itemlist:
|
||||
item_url = item.tourl()
|
||||
|
||||
if item.category == "":
|
||||
item.category = parent_item.category
|
||||
if not item.title:
|
||||
item.title = ''
|
||||
# Si no hay action o es findvideos/play, folder=False porque no se va a devolver ningún listado
|
||||
if item.action in ['play', '']:
|
||||
item.folder = False
|
||||
if item.fanart == "":
|
||||
item.fanart = parent_item.fanart
|
||||
if item.action == 'play' and thumb_type == 1 and not item.forcethumb:
|
||||
item.thumbnail = "https://github.com/kodiondemand/media/raw/master/resources/servers/" + item.server.lower() + '.png'
|
||||
|
||||
# if cloudflare, cookies are needed to display images taken from site
|
||||
# before checking domain (time consuming), checking if tmdb failed (so, images scraped from website are used)
|
||||
if item.action in ['findvideos'] and not item.infoLabels['tmdb_id'] and item.channel in httptools.channelsCF:
|
||||
item.thumbnail = httptools.get_url_headers(item.thumbnail)
|
||||
item.fanart = httptools.get_url_headers(item.fanart)
|
||||
|
||||
icon_image = "DefaultFolder.png" if item.folder else "DefaultVideo.png"
|
||||
listitem = xbmcgui.ListItem(item.title)
|
||||
listitem.setArt({'icon': icon_image, 'thumb': item.thumbnail, 'poster': item.thumbnail,
|
||||
'fanart': item.fanart if item.fanart else default_fanart})
|
||||
|
||||
if config.get_setting("player_mode") == 1 and item.action == "play":
|
||||
listitem.setProperty('IsPlayable', 'true')
|
||||
|
||||
set_infolabels(listitem, item)
|
||||
|
||||
# context menu
|
||||
if parent_item.channel != 'special':
|
||||
context_commands = def_context_commands + set_context_commands(item, item_url, parent_item, has_extendedinfo=has_extendedinfo,
|
||||
superfavourites=superfavourites)
|
||||
else:
|
||||
context_commands = def_context_commands
|
||||
listitem.addContextMenuItems(context_commands)
|
||||
|
||||
xbmcplugin.addDirectoryItem(_handle, '%s?%s' % (sys.argv[0], item_url), listitem, item.folder)
|
||||
|
||||
if parent_item.list_type == '':
|
||||
breadcrumb = parent_item.category.capitalize()
|
||||
else:
|
||||
if 'similar' in parent_item.list_type:
|
||||
if parent_item.contentTitle != '':
|
||||
breadcrumb = config.get_localized_string(70693) + parent_item.contentTitle
|
||||
else:
|
||||
breadcrumb = config.get_localized_string(70693) + parent_item.contentSerieName
|
||||
else:
|
||||
breadcrumb = config.get_localized_string(70693)
|
||||
|
||||
xbmcplugin.setPluginCategory(handle=_handle, category=breadcrumb)
|
||||
|
||||
set_view_mode(item, parent_item)
|
||||
|
||||
xbmcplugin.endOfDirectory(_handle)
|
||||
logger.info('END render_items')
|
||||
|
||||
|
||||
def set_view_mode(item, parent_item):
|
||||
def mode(content, Type):
|
||||
mode = int(config.get_setting('view_mode_%s' % content).split(',')[-1])
|
||||
if mode > 0:
|
||||
xbmcplugin.setContent(handle=int(sys.argv[1]), content=Type)
|
||||
xbmc.executebuiltin('Container.SetViewMode(%s)' % mode)
|
||||
logger.info('TYPE: ' + Type)
|
||||
else:
|
||||
xbmcplugin.setContent(handle=int(sys.argv[1]), content='')
|
||||
xbmc.executebuiltin('Container.SetViewMode(%s)' % 55)
|
||||
logger.info('TYPE: ' + 'None')
|
||||
|
||||
def reset_view_mode():
|
||||
for mode in ['addon','channel','movie','tvshow','season','episode','server']:
|
||||
config.set_setting('skin_name', xbmc.getSkinDir())
|
||||
config.set_setting('view_mode_%s' % mode, config.get_localized_string(70003) + ' , 0')
|
||||
|
||||
if xbmc.getSkinDir() != config.get_setting('skin_name') or not config.get_setting('skin_name'):
|
||||
reset_view_mode()
|
||||
xbmcplugin.setContent(handle=int(sys.argv[1]), content='')
|
||||
xbmc.executebuiltin('Container.SetViewMode(%s)' % 55)
|
||||
|
||||
elif (item.contentType in ['movie'] and parent_item.action in ['peliculas']) \
|
||||
or (item.channel in ['videolibrary'] and parent_item.action in ['list_movies']) \
|
||||
or parent_item.action in ['now_on_tv', 'now_on_misc', 'now_on_misc_film']:
|
||||
mode('movie', 'movies')
|
||||
|
||||
elif (item.contentType in ['tvshow'] and parent_item.action in ['peliculas']) \
|
||||
or (item.channel in ['videolibrary'] and parent_item.action in ['list_tvshows']):
|
||||
mode('tvshow', 'tvshows')
|
||||
|
||||
elif parent_item.action in ['get_seasons']:
|
||||
mode('season', 'tvshows')
|
||||
|
||||
elif parent_item.action in ['episodios', 'get_episodes']:
|
||||
mode('episode', 'tvshows')
|
||||
|
||||
elif parent_item.action == 'findvideos':
|
||||
mode('server', 'addons')
|
||||
|
||||
elif parent_item.action == 'mainlist':
|
||||
mode('channel', 'addons')
|
||||
|
||||
else:
|
||||
mode('addon', 'addons')
|
||||
|
||||
|
||||
def render_items_old(itemlist, parent_item):
|
||||
"""
|
||||
Función encargada de mostrar el itemlist en kodi, se pasa como parametros el itemlist y el item del que procede
|
||||
@type itemlist: list
|
||||
@@ -147,7 +300,7 @@ def render_items(itemlist, parent_item):
|
||||
|
||||
# Si no hay ningun item, mostramos un aviso
|
||||
if not len(itemlist):
|
||||
itemlist.append(Item(title=config.get_localized_string(60347)))
|
||||
itemlist.append(Item(title=config.get_localized_string(60347), thumbnail=get_thumb('nofolder.png')))
|
||||
|
||||
genre = False
|
||||
if 'nero' in parent_item.title:
|
||||
@@ -155,33 +308,41 @@ def render_items(itemlist, parent_item):
|
||||
anime = False
|
||||
if 'anime' in channeltools.get_channel_parameters(parent_item.channel)['categories']:
|
||||
anime = True
|
||||
try:
|
||||
force_unify = channeltools.get_channel_parameters(parent_item.channel)['force_unify']
|
||||
except:
|
||||
force_unify = False
|
||||
# try:
|
||||
# force_unify = channeltools.get_channel_parameters(parent_item.channel)['force_unify']
|
||||
# except:
|
||||
force_unify = False
|
||||
|
||||
unify_enabled = config.get_setting('unify')
|
||||
try:
|
||||
if channeltools.get_channel_parameters(parent_item.channel)['adult']:
|
||||
unify_enabled = False
|
||||
except:
|
||||
pass
|
||||
unify_enabled = False
|
||||
|
||||
has_extendedinfo = xbmc.getCondVisibility('System.HasAddon(script.extendedinfo)')
|
||||
|
||||
# Añadir SuperFavourites al menu contextual (1.0.53 o superior necesario)
|
||||
sf_file_path = xbmc.translatePath("special://home/addons/plugin.program.super.favourites/LaunchSFMenu.py")
|
||||
check_sf = os.path.exists(sf_file_path)
|
||||
superfavourites = check_sf and xbmc.getCondVisibility('System.HasAddon("plugin.program.super.favourites")')
|
||||
# try:
|
||||
# if channeltools.get_channel_parameters(parent_item.channel)['adult']:
|
||||
# unify_enabled = False
|
||||
# except:
|
||||
# pass
|
||||
# logger.debug('unify_enabled: %s' % unify_enabled)
|
||||
|
||||
# Recorremos el itemlist
|
||||
for item in itemlist:
|
||||
# logger.debug(item)
|
||||
# Si el item no contiene categoria, le ponemos la del item padre
|
||||
item_url = item.tourl()
|
||||
if item.category == "":
|
||||
item.category = parent_item.category
|
||||
|
||||
# Si title no existe, lo iniciamos como str, para evitar errones "NoType"
|
||||
if not item.title:
|
||||
item.title = ''
|
||||
|
||||
|
||||
# Si no hay action o es findvideos/play, folder=False porque no se va a devolver ningún listado
|
||||
if item.action in ['play', '']:
|
||||
item.folder = False
|
||||
item.folder = False
|
||||
|
||||
# Si el item no contiene fanart, le ponemos el del item padre
|
||||
if item.fanart == "":
|
||||
@@ -199,9 +360,9 @@ def render_items(itemlist, parent_item):
|
||||
item.thumbnail = get_thumb("next.png")
|
||||
elif 'add' in item.action:
|
||||
if 'pelicula' in item.action:
|
||||
item.thumbnail = get_thumb("videolibrary_movie.png")
|
||||
item.thumbnail = get_thumb("add_to_videolibrary.png")
|
||||
elif 'serie' in item.action:
|
||||
item.thumbnail = get_thumb("videolibrary_tvshow.png")
|
||||
item.thumbnail = get_thumb("add_to_videolibrary.png")
|
||||
|
||||
if (unify_enabled or force_unify) and parent_item.channel not in ['kodfavourites']:
|
||||
# Formatear titulo con unify
|
||||
@@ -257,14 +418,14 @@ def render_items(itemlist, parent_item):
|
||||
|
||||
# Añadimos los infoLabels
|
||||
set_infolabels(listitem, item)
|
||||
|
||||
|
||||
# No arrastrar plot si no es una peli/serie/temporada/episodio
|
||||
if item.plot and item.contentType not in ['movie', 'tvshow', 'season', 'episode']:
|
||||
item.__dict__['infoLabels'].pop('plot')
|
||||
|
||||
# Montamos el menu contextual
|
||||
if parent_item.channel != 'special':
|
||||
context_commands = set_context_commands(item, parent_item)
|
||||
context_commands = set_context_commands(item, item_url, parent_item, has_extendedinfo=has_extendedinfo, superfavourites=superfavourites)
|
||||
else:
|
||||
context_commands = []
|
||||
# Añadimos el menu contextual
|
||||
@@ -278,7 +439,7 @@ def render_items(itemlist, parent_item):
|
||||
|
||||
if not item.totalItems:
|
||||
item.totalItems = 0
|
||||
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url='%s?%s' % (sys.argv[0], item.tourl()),
|
||||
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url='%s?%s' % (sys.argv[0], item_url),
|
||||
listitem=listitem, isFolder=item.folder,
|
||||
totalItems=item.totalItems)
|
||||
|
||||
@@ -313,11 +474,11 @@ def render_items(itemlist, parent_item):
|
||||
xbmcplugin.endOfDirectory(handle=int(sys.argv[1]), succeeded=True)
|
||||
|
||||
# Fijar la vista
|
||||
if config.get_setting("forceview"):
|
||||
viewmode_id = get_viewmode_id(parent_item)
|
||||
xbmc.executebuiltin("Container.SetViewMode(%s)" % viewmode_id)
|
||||
if parent_item.mode in ['silent', 'get_cached', 'set_cache', 'finish']:
|
||||
xbmc.executebuiltin("Container.SetViewMode(500)")
|
||||
# if config.get_setting("forceview"):
|
||||
# viewmode_id = get_viewmode_id(parent_item)
|
||||
# xbmc.executebuiltin("Container.SetViewMode(%s)" % viewmode_id)
|
||||
# if parent_item.mode in ['silent', 'get_cached', 'set_cache', 'finish']:
|
||||
# xbmc.executebuiltin("Container.SetViewMode(500)")
|
||||
|
||||
logger.info('END render_items')
|
||||
|
||||
@@ -397,37 +558,42 @@ def set_infolabels(listitem, item, player=False):
|
||||
'top250': 'top250', 'tracknumber': 'tracknumber', 'trailer': 'trailer', 'thumbnail': 'None',
|
||||
'tvdb_id': 'None', 'tvshowtitle': 'tvshowtitle', 'type': 'None', 'userrating': 'userrating',
|
||||
'url_scraper': 'None', 'votes': 'votes', 'writer': 'writer', 'year': 'year'}
|
||||
|
||||
infoLabels_kodi = {}
|
||||
|
||||
if item.infoLabels:
|
||||
if 'mediatype' not in item.infoLabels:
|
||||
item.infoLabels['mediatype'] = item.contentType
|
||||
|
||||
try:
|
||||
for label_tag, label_value in list(item.infoLabels.items()):
|
||||
try:
|
||||
# logger.debug(str(label_tag) + ': ' + str(infoLabels_dict[label_tag]))
|
||||
if infoLabels_dict[label_tag] != 'None':
|
||||
infoLabels_kodi.update({infoLabels_dict[label_tag]: item.infoLabels[label_tag]})
|
||||
except:
|
||||
continue
|
||||
|
||||
infoLabels_kodi = {infoLabels_dict[label_tag]: item.infoLabels[label_tag] for label_tag, label_value in list(item.infoLabels.items()) if infoLabels_dict[label_tag] != 'None'}
|
||||
listitem.setInfo("video", infoLabels_kodi)
|
||||
|
||||
except:
|
||||
listitem.setInfo("video", item.infoLabels)
|
||||
logger.error(item.infoLabels)
|
||||
logger.error(infoLabels_kodi)
|
||||
|
||||
if player and not item.contentTitle:
|
||||
listitem.setInfo("video", {"Title": item.title})
|
||||
|
||||
elif not player:
|
||||
listitem.setInfo("video", {"Title": item.title})
|
||||
# if item.infoLabels:
|
||||
# if 'mediatype' not in item.infoLabels:
|
||||
# item.infoLabels['mediatype'] = item.contentType
|
||||
#
|
||||
# try:
|
||||
# for label_tag, label_value in list(item.infoLabels.items()):
|
||||
# try:
|
||||
# # logger.debug(str(label_tag) + ': ' + str(infoLabels_dict[label_tag]))
|
||||
# if infoLabels_dict[label_tag] != 'None':
|
||||
# infoLabels_kodi.update({infoLabels_dict[label_tag]: item.infoLabels[label_tag]})
|
||||
# except:
|
||||
# continue
|
||||
#
|
||||
# listitem.setInfo("video", infoLabels_kodi)
|
||||
#
|
||||
# except:
|
||||
# listitem.setInfo("video", item.infoLabels)
|
||||
# logger.error(item.infoLabels)
|
||||
# logger.error(infoLabels_kodi)
|
||||
#
|
||||
# if player and not item.contentTitle:
|
||||
# listitem.setInfo("video", {"Title": item.title})
|
||||
#
|
||||
# elif not player:
|
||||
# listitem.setInfo("video", {"Title": item.title})
|
||||
|
||||
|
||||
def set_context_commands(item, parent_item):
|
||||
def set_context_commands(item, item_url, parent_item, **kwargs):
|
||||
"""
|
||||
Función para generar los menus contextuales.
|
||||
1. Partiendo de los datos de item.context
|
||||
@@ -458,7 +624,7 @@ def set_context_commands(item, parent_item):
|
||||
@type parent_item: item
|
||||
"""
|
||||
context_commands = []
|
||||
num_version_xbmc = config.get_platform(True)['num_version']
|
||||
# num_version_xbmc = config.get_platform(True)['num_version']
|
||||
|
||||
# Creamos un list con las diferentes opciones incluidas en item.context
|
||||
if isinstance(item.context, str):
|
||||
@@ -468,43 +634,6 @@ def set_context_commands(item, parent_item):
|
||||
else:
|
||||
context = []
|
||||
|
||||
# if config.get_setting("faster_item_serialization"):
|
||||
# # logger.info("Reducing serialization!")
|
||||
# itemBK = item
|
||||
# item = Item()
|
||||
# item.action = itemBK.action
|
||||
# item.channel = itemBK.channel
|
||||
# infoLabels = {}
|
||||
# if itemBK.infoLabels["year"]: infoLabels["year"] = itemBK.infoLabels["year"]
|
||||
# if itemBK.infoLabels["imdb_id"]: infoLabels["imdb_id"] = itemBK.infoLabels["imdb_id"]
|
||||
# if itemBK.infoLabels["tmdb_id"]: infoLabels["tmdb_id"] = itemBK.infoLabels["tmdb_id"]
|
||||
# if itemBK.infoLabels["tvdb_id"]: infoLabels["tvdb_id"] = itemBK.infoLabels["tvdb_id"]
|
||||
# if itemBK.infoLabels["noscrap_id"]: infoLabels["noscrap_id"] = itemBK.infoLabels["noscrap_id"]
|
||||
# if len(infoLabels) > 0: item.infoLabels = infoLabels
|
||||
|
||||
# if itemBK.thumbnail: item.thumbnail = itemBK.thumbnail
|
||||
# if itemBK.extra: item.extra = itemBK.extra
|
||||
# if itemBK.contentEpisodeNumber: item.contentEpisodeNumber = itemBK.contentEpisodeNumber
|
||||
# if itemBK.contentEpisodeTitle: item.contentEpisodeTitle = itemBK.contentEpisodeTitle
|
||||
# if itemBK.contentPlot: item.contentPlot = itemBK.contentPlot
|
||||
# if itemBK.contentQuality: item.contentQuality = itemBK.contentQuality
|
||||
# if itemBK.contentSeason: item.contentSeason = itemBK.contentSeason
|
||||
# if itemBK.contentSerieName: item.contentSerieName = itemBK.contentSerieName
|
||||
# if itemBK.contentThumbnail: item.contentThumbnail = itemBK.contentThumbnail
|
||||
# if itemBK.contentTitle: item.contentTitle = itemBK.contentTitle
|
||||
# if itemBK.contentType: item.contentType = itemBK.contentType
|
||||
# if itemBK.duration: item.duration = itemBK.duration
|
||||
# if itemBK.plot: item.plot = itemBK.plot
|
||||
# if itemBK.quality: item.quality = itemBK.quality
|
||||
# if itemBK.show: item.show = itemBK.show
|
||||
# if itemBK.title: item.title = itemBK.title
|
||||
# if itemBK.viewcontent: item.viewcontent = itemBK.viewcontent
|
||||
|
||||
# itemJson = item.tojson()
|
||||
# logger.info("Elemento: {0} bytes".format(len(itemJson)))
|
||||
# logger.info(itemJson)
|
||||
# logger.info("--------------------------------------------------------------")
|
||||
|
||||
# Opciones segun item.context
|
||||
for command in context:
|
||||
# Predefinidos
|
||||
@@ -535,15 +664,14 @@ def set_context_commands(item, parent_item):
|
||||
# No añadir más opciones predefinidas si se está dentro de Alfavoritos
|
||||
if parent_item.channel == 'kodfavorites':
|
||||
return context_commands
|
||||
|
||||
# Opciones segun criterios, solo si el item no es un tag (etiqueta), ni es "Añadir a la videoteca", etc...
|
||||
# Opciones segun criterios, solo si el item no es un tag (etiqueta), ni es "Añadir a la videoteca", etc...
|
||||
if item.action and item.action not in ["add_pelicula_to_library", "add_serie_to_library", "buscartrailer", "actualizar_titulos"]:
|
||||
# Mostrar informacion: si el item tiene plot suponemos q es una serie, temporada, capitulo o pelicula
|
||||
if item.infoLabels['plot'] and (num_version_xbmc < 17.0 or item.contentType == 'season'):
|
||||
context_commands.append((config.get_localized_string(60348), "XBMC.Action(Info)"))
|
||||
# if item.infoLabels['plot'] and (num_version_xbmc < 17.0 or item.contentType == 'season'):
|
||||
# context_commands.append((config.get_localized_string(60348), "XBMC.Action(Info)"))
|
||||
|
||||
# ExtendedInfo: Si está instalado el addon y se cumplen una serie de condiciones
|
||||
if xbmc.getCondVisibility('System.HasAddon(script.extendedinfo)') \
|
||||
if kwargs.get('has_extendedinfo') \
|
||||
and config.get_setting("extended_info") == True:
|
||||
if item.contentType == "episode" and item.contentEpisodeNumber and item.contentSeason \
|
||||
and (item.infoLabels['tmdb_id'] or item.contentSerieName):
|
||||
@@ -575,43 +703,39 @@ def set_context_commands(item, parent_item):
|
||||
|
||||
context_commands.append(("ExtendedInfo",
|
||||
"XBMC.RunScript(script.extendedinfo,info=extendedinfo,%s)" % param))
|
||||
|
||||
# InfoPlus
|
||||
# InfoPlus
|
||||
if config.get_setting("infoplus"):
|
||||
#if item.infoLabels['tmdb_id'] or item.infoLabels['imdb_id'] or item.infoLabels['tvdb_id'] or \
|
||||
# (item.contentTitle and item.infoLabels["year"]) or item.contentSerieName:
|
||||
if item.infoLabels['tmdb_id'] or item.infoLabels['imdb_id'] or item.infoLabels['tvdb_id']:
|
||||
context_commands.append(("InfoPlus", "XBMC.RunPlugin(%s?%s)" % (sys.argv[0], item.clone(
|
||||
channel="infoplus", action="start", from_channel=item.channel).tourl())))
|
||||
context_commands.append(("InfoPlus", "XBMC.RunPlugin(%s?%s&%s)" % (sys.argv[0], item_url,
|
||||
'channel=infoplus&action=start&from_channel=' + item.channel)))
|
||||
|
||||
# Ir al Menu Principal (channel.mainlist)
|
||||
if parent_item.channel not in ["news", "channelselector"] and item.action != "mainlist" \
|
||||
if parent_item.channel not in ["news", "channelselector", "downloads"] and item.action != "mainlist" \
|
||||
and parent_item.action != "mainlist":
|
||||
context_commands.insert(0, (config.get_localized_string(60349), "XBMC.Container.Refresh (%s?%s)" %
|
||||
(sys.argv[0], Item(channel=item.channel, action="mainlist").tourl())))
|
||||
(sys.argv[0], Item(channel=item.channel, action="mainlist").tourl())))
|
||||
context_commands.insert(1, (config.get_localized_string(70739),
|
||||
"XBMC.Container.Update (%s?%s)" % (sys.argv[0], Item(action="open_browser",
|
||||
url=item.url).tourl())))
|
||||
|
||||
# Añadir a Favoritos
|
||||
if num_version_xbmc < 17.0 and \
|
||||
((item.channel not in ["favorites", "videolibrary", "help", ""]
|
||||
or item.action in ["update_videolibrary"]) and parent_item.channel != "favorites"):
|
||||
context_commands.append((config.get_localized_string(30155), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(channel="favorites", action="addFavourite",
|
||||
from_channel=item.channel,
|
||||
from_action=item.action).tourl())))
|
||||
# if num_version_xbmc < 17.0 and \
|
||||
# ((item.channel not in ["favorites", "videolibrary", "help", ""]
|
||||
# or item.action in ["update_videolibrary"]) and parent_item.channel != "favorites"):
|
||||
# context_commands.append((config.get_localized_string(30155), "XBMC.RunPlugin(%s?%s&%s)" %
|
||||
# (sys.argv[0], item_url, 'channel=favorites&action=addFavourite&from_channel=' + item.channel + '&from_action=' + item.action)))
|
||||
|
||||
# Añadir a Alfavoritos (Mis enlaces)
|
||||
if item.channel not in ["favorites", "videolibrary", "help", ""] and parent_item.channel != "favorites":
|
||||
context_commands.append(
|
||||
(config.get_localized_string(70557), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(channel="kodfavourites", action="addFavourite",
|
||||
from_channel=item.channel,
|
||||
from_action=item.action).tourl())))
|
||||
|
||||
# Buscar en otros canales
|
||||
if item.contentType in ['movie', 'tvshow'] and item.channel != 'search' and item.action not in ['play']:
|
||||
(config.get_localized_string(70557), "XBMC.RunPlugin(%s?%s&%s)" %
|
||||
(sys.argv[0], item_url, urllib.urlencode({'channel': "kodfavourites", 'action': "addFavourite",
|
||||
'from_channel': item.channel,
|
||||
'from_action': item.action}))))
|
||||
# Buscar en otros canales
|
||||
if item.contentType in ['movie', 'tvshow'] and item.channel != 'search' and item.action not in ['play'] and parent_item.action != 'mainlist':
|
||||
|
||||
# Buscar en otros canales
|
||||
if item.contentSerieName != '':
|
||||
@@ -625,20 +749,17 @@ def set_context_commands(item, parent_item):
|
||||
mediatype = item.contentType
|
||||
|
||||
context_commands.append((config.get_localized_string(60350),
|
||||
"XBMC.Container.Update (%s?%s)" % (sys.argv[0],
|
||||
item.clone(channel='search',
|
||||
action="from_context",
|
||||
from_channel=item.channel,
|
||||
contextual=True,
|
||||
text=item.wanted).tourl())))
|
||||
"XBMC.Container.Update (%s?%s&%s)" % (sys.argv[0],
|
||||
item_url, urllib.urlencode({'channel': 'search',
|
||||
'action': "from_context",
|
||||
'from_channel': item.channel,
|
||||
'contextual': True,
|
||||
'text': item.wanted}))))
|
||||
|
||||
context_commands.append(
|
||||
(config.get_localized_string(70561), "XBMC.Container.Update (%s?%s)" % (
|
||||
sys.argv[0], item.clone(channel='search', action='from_context', search_type='list', page='1',
|
||||
list_type='%s/%s/similar' % (
|
||||
mediatype, item.infoLabels['tmdb_id'])).tourl())))
|
||||
|
||||
# Definir como Pagina de inicio
|
||||
(config.get_localized_string(70561), "XBMC.Container.Update (%s?%s&%s)" % (
|
||||
sys.argv[0], item_url, 'channel=search&action=from_context&search_type=list&page=1&list_type=%s/%s/similar' % (mediatype, item.infoLabels['tmdb_id']))))
|
||||
# Definir como Pagina de inicio
|
||||
if config.get_setting('start_page'):
|
||||
if item.action not in ['episodios', 'seasons', 'findvideos', 'play']:
|
||||
context_commands.insert(0, (config.get_localized_string(60351),
|
||||
@@ -651,46 +772,34 @@ def set_context_commands(item, parent_item):
|
||||
or (item.channel != "videolibrary" and config.get_localized_string(70585) in str(item.context) and config.get_localized_string(70714) in str(item.context)):
|
||||
# Añadir Serie a la videoteca
|
||||
if item.action in ["episodios", "get_episodios", "get_seasons"] and item.contentSerieName:
|
||||
context_commands.append((config.get_localized_string(60352), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(action="add_serie_to_library",
|
||||
from_action=item.action).tourl())))
|
||||
context_commands.append((config.get_localized_string(60352), "XBMC.RunPlugin(%s?%s&%s)" %
|
||||
(sys.argv[0], item_url, 'action=add_serie_to_library&from_action=' + item.action)))
|
||||
# Añadir Pelicula a videoteca
|
||||
elif item.action in ["detail", "findvideos"] and item.contentType == 'movie' and item.contentTitle:
|
||||
context_commands.append((config.get_localized_string(60353), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(action="add_pelicula_to_library",
|
||||
from_action=item.action).tourl())))
|
||||
|
||||
if item.channel not in ["downloads", "videolibrary"] and item.server != 'torrent':
|
||||
context_commands.append((config.get_localized_string(60353), "XBMC.RunPlugin(%s?%s&%s)" %
|
||||
(sys.argv[0], item_url, 'action=add_pelicula_to_library&from_action=' + item.action)))
|
||||
|
||||
if item.channel not in ["downloads"] and item.server != 'torrent' and parent_item.action != 'mainlist' and config.get_setting('downloadenabled'):
|
||||
# Descargar pelicula
|
||||
if item.contentType == "movie":
|
||||
context_commands.append((config.get_localized_string(60354), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
||||
from_channel=item.channel, from_action=item.action)
|
||||
.tourl())))
|
||||
context_commands.append((config.get_localized_string(60354), "XBMC.RunPlugin(%s?%s&%s)" %
|
||||
(sys.argv[0], item_url, 'channel=downloads&action=save_download&from_channel=' + item.channel + '&from_action=' + item.action)))
|
||||
|
||||
elif item.contentSerieName:
|
||||
# Descargar serie
|
||||
if item.contentType == "tvshow":
|
||||
context_commands.append((config.get_localized_string(60355), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
||||
from_channel=item.channel,
|
||||
from_action=item.action).tourl())))
|
||||
context_commands.append((config.get_localized_string(60357), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(channel="downloads", action="save_download", download="seson",
|
||||
from_channel=item.channel,
|
||||
from_action=item.action).tourl())))
|
||||
context_commands.append((config.get_localized_string(60355), "XBMC.RunPlugin(%s?%s&%s)" %
|
||||
(sys.argv[0], item_url, 'channel=downloads&action=save_download&from_channel=' + item.channel + '&from_action=' + item.action)))
|
||||
context_commands.append((config.get_localized_string(60357), "XBMC.RunPlugin(%s?%s&%s)" %
|
||||
(sys.argv[0], item_url, 'channel=downloads&action=save_download&download=season&from_channel=' + item.channel + '&from_action=' + item.action)))
|
||||
# Descargar episodio
|
||||
elif item.contentType == "episode":
|
||||
context_commands.append((config.get_localized_string(60356), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
||||
from_channel=item.channel,
|
||||
from_action=item.action).tourl())))
|
||||
context_commands.append((config.get_localized_string(60356), "XBMC.RunPlugin(%s?%s&%s)" %
|
||||
(sys.argv[0], item_url, 'channel=downloads&action=save_download&from_channel=' + item.channel + '&from_action=' + item.action)))
|
||||
# Descargar temporada
|
||||
elif item.contentType == "season":
|
||||
context_commands.append((config.get_localized_string(60357), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
||||
from_channel=item.channel,
|
||||
from_action=item.action).tourl())))
|
||||
context_commands.append((config.get_localized_string(60357), "XBMC.RunPlugin(%s?%s&%s)" %
|
||||
(sys.argv[0], item_url, 'channel=downloads&action=save_download&download=season&from_channel=' + item.channel + '&from_action=' + item.action)))
|
||||
|
||||
# # Abrir configuración
|
||||
# if parent_item.channel not in ["setting", "news", "search"] and item.action == "play":
|
||||
@@ -698,20 +807,17 @@ def set_context_commands(item, parent_item):
|
||||
# (sys.argv[0], Item(channel="setting", action="mainlist").tourl())))
|
||||
|
||||
# Buscar Trailer
|
||||
if item.action == "findvideos" or "buscar_trailer" in context:
|
||||
if item.action in ["findvideos", 'episodios', 'check'] or "buscar_trailer" in context:
|
||||
context_commands.append(
|
||||
(config.get_localized_string(60359), "XBMC.RunPlugin(%s?%s)" % (sys.argv[0], item.clone(
|
||||
channel="trailertools", action="buscartrailer", contextual=True).tourl())))
|
||||
(config.get_localized_string(60359), "XBMC.RunPlugin(%s?%s)" % (sys.argv[0], urllib.urlencode({
|
||||
'channel': "trailertools", 'action': "buscartrailer", 'search_title': item.fulltitle if item.fulltitle else item.contentTitle, 'contextual': True}))))
|
||||
|
||||
# Añadir SuperFavourites al menu contextual (1.0.53 o superior necesario)
|
||||
sf_file_path = xbmc.translatePath("special://home/addons/plugin.program.super.favourites/LaunchSFMenu.py")
|
||||
check_sf = os.path.exists(sf_file_path)
|
||||
if check_sf and xbmc.getCondVisibility('System.HasAddon("plugin.program.super.favourites")'):
|
||||
context_commands.append((config.get_localized_string(60361),
|
||||
if kwargs.get('superfavourites'):
|
||||
context_commands.append((config.get_localized_string(60361),
|
||||
"XBMC.RunScript(special://home/addons/plugin.program.super.favourites/LaunchSFMenu.py)"))
|
||||
|
||||
# context_commands = sorted(context_commands, key=lambda comand: comand[0])
|
||||
|
||||
|
||||
# Menu Rapido
|
||||
# context_commands.insert(0, (config.get_localized_string(60360),
|
||||
# "XBMC.Container.Update (%s?%s)" % (sys.argv[0], Item(channel='side_menu',
|
||||
@@ -993,7 +1099,7 @@ def get_dialogo_opciones(item, default_action, strm, autoplay):
|
||||
# Si puedes ver el vídeo, presenta las opciones
|
||||
if puedes:
|
||||
for video_url in video_urls:
|
||||
opciones.append(config.get_localized_string(30151) + " " + video_url[0])
|
||||
opciones.append(config.get_localized_string(60221) + " " + video_url[0])
|
||||
|
||||
if item.server == "local":
|
||||
opciones.append(config.get_localized_string(30164))
|
||||
@@ -1071,14 +1177,7 @@ def set_opcion(item, seleccion, opciones, video_urls):
|
||||
# "Descargar"
|
||||
elif opciones[seleccion] == config.get_localized_string(30153):
|
||||
from specials import downloads
|
||||
import xbmcaddon
|
||||
import xbmcgui
|
||||
__addon__ = xbmcaddon.Addon()
|
||||
__addonname__ = __addon__.getAddonInfo('name')
|
||||
line1 = config.get_localized_string(70690)
|
||||
line2 = config.get_localized_string(70691)
|
||||
line3 = config.get_localized_string(70692)
|
||||
xbmcgui.Dialog().ok(__addonname__, line1, line2, line3)
|
||||
downloads.show_disclaimer()
|
||||
|
||||
if item.contentType == "list" or item.contentType == "tvshow":
|
||||
item.contentType = "video"
|
||||
@@ -1169,7 +1268,7 @@ def set_player(item, xlistitem, mediaurl, view, strm):
|
||||
logger.info("player_mode=%s" % config.get_setting("player_mode"))
|
||||
logger.info("mediaurl=" + mediaurl)
|
||||
if config.get_setting("player_mode") == 3 or "megacrypter.com" in mediaurl:
|
||||
from . import download_and_play
|
||||
from platformcode import download_and_play
|
||||
download_and_play.download_and_play(mediaurl, "download_and_play.tmp", config.get_setting("downloadpath"))
|
||||
return
|
||||
|
||||
@@ -1218,8 +1317,7 @@ 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_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"]):
|
||||
@@ -1240,6 +1338,16 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
from lib import generictools
|
||||
from servers import torrent
|
||||
|
||||
|
||||
# Si Libtorrent ha dado error de inicialización, no se pueden usar los clientes internos
|
||||
UNRAR = config.get_setting("unrar_path", server="torrent", default="")
|
||||
LIBTORRENT = config.get_setting("libtorrent_path", server="torrent", default='')
|
||||
size_rar = 2
|
||||
rar_files = []
|
||||
if item.password:
|
||||
size_rar = 3
|
||||
|
||||
|
||||
# Opciones disponibles para Reproducir torrents
|
||||
torrent_options = list()
|
||||
torrent_options.append([config.get_localized_string(30033)])
|
||||
@@ -1249,6 +1357,12 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
|
||||
torrent_client = config.get_setting("torrent_client", server="torrent")
|
||||
|
||||
# Si es Libtorrent y no está soportado, se ofrecen alternativas, si las hay...
|
||||
if not LIBTORRENT and len(torrent_options) < 3:
|
||||
from specials import quasar_download
|
||||
if dialog_yesno(config.get_localized_string(70784), config.get_localized_string(70782)):
|
||||
quasar_download.download()
|
||||
|
||||
if torrent_client and torrent_client - 1 <= len(torrent_options):
|
||||
if torrent_client == 0:
|
||||
seleccion = dialog_select(config.get_localized_string(70193), [opcion[0] for opcion in torrent_options])
|
||||
@@ -1260,15 +1374,6 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
else:
|
||||
seleccion = 0
|
||||
|
||||
# Si Libtorrent ha dado error de inicialización, no se pueden usar los clientes internos
|
||||
UNRAR = config.get_setting("unrar_path", server="torrent", default="")
|
||||
LIBTORRENT = config.get_setting("libtorrent_path", server="torrent", default='')
|
||||
size_rar = 2
|
||||
rar_files = []
|
||||
if item.password:
|
||||
size_rar = 3
|
||||
|
||||
# Si es Libtorrent y no está soportado, se ofrecen alternativas, si las hay...
|
||||
if seleccion < 2 and not LIBTORRENT:
|
||||
dialog_ok(config.get_localized_string(30033), config.get_localized_string(70774), \
|
||||
config.get_localized_string(70775) % config.get_setting("libtorrent_error", server="torrent", default=''), \
|
||||
@@ -1362,38 +1467,24 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
item.url = item.torrent_alt
|
||||
|
||||
# Si es un archivo .torrent local, actualizamos el path relativo a path absoluto
|
||||
if (item.url.startswith("\\") or item.url.startswith("/")) and not \
|
||||
url_stat and videolibrary_path: # .torrent alternativo local
|
||||
if (item.url.startswith("\\") or item.url.startswith("/")) and not url_stat and videolibrary_path: # .torrent alternativo local
|
||||
movies = config.get_setting("folder_movies")
|
||||
series = config.get_setting("folder_tvshows")
|
||||
if item.contentType == 'movie':
|
||||
folder = movies # películas
|
||||
else:
|
||||
folder = series # o series
|
||||
item.url = filetools.join(config.get_videolibrary_path(), folder,
|
||||
item.url) # dirección del .torrent local en la Videoteca
|
||||
if filetools.copy(item.url, torrents_path,
|
||||
silent=True): # se copia a la carpeta generíca para evitar problemas de encode
|
||||
item.url = filetools.join(config.get_videolibrary_path(), folder, item.url) # dirección del .torrent local en la Videoteca
|
||||
if filetools.copy(item.url, torrents_path, silent=True): # se copia a la carpeta generíca para evitar problemas de encode
|
||||
item.url = torrents_path
|
||||
if "torrentin" in torrent_options[seleccion][0]: # Si es Torrentin, hay que añadir un prefijo
|
||||
item.url = 'file://' + item.url
|
||||
size, rar_files = generictools.get_torrent_size('', file_list=True, local_torr=torrents_path,
|
||||
short_pad=True)
|
||||
size, rar_files = generictools.get_torrent_size('', file_list=True, local_torr=torrents_path,short_pad=True)
|
||||
|
||||
mediaurl = item.url
|
||||
|
||||
if seleccion >= 0:
|
||||
|
||||
# Si tiene .torrent válido o magnet, lo registramos
|
||||
if size or item.url.startswith('magnet'):
|
||||
try:
|
||||
import threading
|
||||
if not PY3: from lib import alfaresolver
|
||||
else: from lib import alfaresolver_py3 as alfaresolver
|
||||
threading.Thread(target=alfaresolver.frequency_count, args=(item, )).start()
|
||||
except:
|
||||
logger.error(traceback.format_exc(1))
|
||||
|
||||
# Reproductor propio BT (libtorrent)
|
||||
if seleccion == 0:
|
||||
torrent.bt_client(mediaurl, xlistitem, rar_files, subtitle=item.subtitle, password=password, item=item)
|
||||
@@ -1407,8 +1498,7 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
else:
|
||||
mediaurl = urllib.quote_plus(item.url)
|
||||
# Llamada con más parámetros para completar el título
|
||||
if ("quasar" in torrent_options[seleccion][1] or "elementum" in torrent_options[seleccion][1]) \
|
||||
and item.infoLabels['tmdb_id']:
|
||||
if ("quasar" in torrent_options[seleccion][1] or "elementum" in torrent_options[seleccion][1]) and item.infoLabels['tmdb_id']:
|
||||
if item.contentType == 'episode' and "elementum" not in torrent_options[seleccion][1]:
|
||||
mediaurl += "&episode=%s&library=&season=%s&show=%s&tmdb=%s&type=episode" % (
|
||||
item.infoLabels['episode'], item.infoLabels['season'], item.infoLabels['tmdb_id'],
|
||||
@@ -1422,14 +1512,10 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
# y después lo extraemos, incluso con RAR's anidados y con contraseña
|
||||
torr_client = torrent_options[seleccion][0].replace('Plugin externo: ', '')
|
||||
if 'RAR-' in size and torr_client in ['quasar', 'elementum'] and UNRAR:
|
||||
rar_file, save_path_videos, folder_torr = torrent.wait_for_download(rar_files,
|
||||
torr_client) # Esperamos mientras se descarga el RAR
|
||||
rar_file, save_path_videos, folder_torr = torrent.wait_for_download(item, mediaurl, rar_files, torr_client) # Esperamos mientras se descarga el RAR
|
||||
if rar_file and save_path_videos: # Si se ha descargado el RAR...
|
||||
dp = dialog_progress_bg('KoD %s' % torr_client)
|
||||
video_file, rar, video_path, erase_file_path = torrent.extract_files(rar_file, \
|
||||
save_path_videos, password, dp,
|
||||
item,
|
||||
torr_client) # ... extraemos el vídeo del RAR
|
||||
video_file, rar, video_path, erase_file_path = torrent.extract_files(rar_file, save_path_videos, password, dp, item, torr_client) # ... extraemos el vídeo del RAR
|
||||
dp.close()
|
||||
|
||||
# Reproducimos el vídeo extraido, si no hay nada en reproducción
|
||||
@@ -1457,8 +1543,7 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
try:
|
||||
torr_data, deamon_url, index = torrent.get_tclient_data(folder_torr, torr_client)
|
||||
if torr_data and deamon_url:
|
||||
data = httptools.downloadpage('%sdelete/%s' % (deamon_url, index), timeout=5,
|
||||
alfa_s=True).data
|
||||
data = httptools.downloadpage('%sdelete/%s' % (deamon_url, index), timeout=5, alfa_s=True).data
|
||||
time.sleep(1)
|
||||
if filetools.isdir(erase_file_path):
|
||||
filetools.rmdirtree(erase_file_path)
|
||||
@@ -1466,8 +1551,7 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
filetools.remove(erase_file_path)
|
||||
except:
|
||||
logger.error(traceback.format_exc(1))
|
||||
elementum_dl = config.get_setting("elementum_dl", server="torrent",
|
||||
default='') # Si salvamos el cambio de Elementum
|
||||
elementum_dl = config.get_setting("elementum_dl", server="torrent", default='') # Si salvamos el cambio de Elementum
|
||||
if elementum_dl:
|
||||
config.set_setting("elementum_dl", "", server="torrent") # lo reseteamos en Alfa
|
||||
xbmcaddon.Addon(id="plugin.video.%s" % torrent_options[seleccion][0].replace('Plugin externo: ', '')) \
|
||||
|
||||
@@ -5,7 +5,7 @@ import shutil
|
||||
from lib.six import BytesIO
|
||||
|
||||
from core import filetools
|
||||
from platformcode import logger, platformtools
|
||||
from platformcode import config, logger, platformtools
|
||||
import json
|
||||
import xbmc
|
||||
import re
|
||||
@@ -19,6 +19,7 @@ import sys
|
||||
PY3 = False
|
||||
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
|
||||
addon = xbmcaddon.Addon('plugin.video.kod')
|
||||
addonname = addon.getAddonInfo('name')
|
||||
|
||||
_hdr_pat = re.compile("^@@ -(\d+),?(\d+)? \+(\d+),?(\d+)? @@.*")
|
||||
|
||||
@@ -43,13 +44,13 @@ def loadCommits(page=1):
|
||||
except:
|
||||
xbmc.sleep(1000)
|
||||
else:
|
||||
platformtools.dialog_notification('Kodi on Demand', 'impossibile controllare gli aggiornamenti')
|
||||
platformtools.dialog_notification(addonname, config.get_localized_string(70675))
|
||||
ret = None
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
# ret -> aggiornato, necessita reload videolibrary_service
|
||||
# ret -> aggiornato, necessita reload service
|
||||
def check(background=False):
|
||||
if not addon.getSetting('addon_update_enabled'):
|
||||
return False, False
|
||||
@@ -109,7 +110,7 @@ def check(background=False):
|
||||
logger.info(file["filename"])
|
||||
if 'resources/language' in file["filename"]:
|
||||
poFilesChanged = True
|
||||
if 'videolibrary_service.py' in file["filename"]:
|
||||
if 'service.py' in file["filename"]:
|
||||
serviceChanged = True
|
||||
if file['status'] == 'modified' or file['status'] == 'added':
|
||||
if 'patch' in file:
|
||||
|
||||
@@ -20,6 +20,7 @@ from core import jsontools
|
||||
from platformcode import config, logger
|
||||
from platformcode import platformtools
|
||||
from core import scrapertools
|
||||
from xml.dom import minidom
|
||||
|
||||
|
||||
def mark_auto_as_watched(item):
|
||||
@@ -511,22 +512,7 @@ def update(folder_content=config.get_setting("folder_tvshows"), folder=""):
|
||||
|
||||
data = get_data(payload)
|
||||
|
||||
|
||||
def clean(mostrar_dialogo=False):
|
||||
"""
|
||||
limpia la libreria de elementos que no existen
|
||||
@param mostrar_dialogo: muestra el cuadro de progreso mientras se limpia la videoteca
|
||||
@type mostrar_dialogo: bool
|
||||
"""
|
||||
logger.info()
|
||||
payload = {"jsonrpc": "2.0", "method": "VideoLibrary.Clean", "id": 1,
|
||||
"params": {"showdialogs": mostrar_dialogo}}
|
||||
data = get_data(payload)
|
||||
|
||||
if data.get('result', False) == 'OK':
|
||||
return True
|
||||
|
||||
return False
|
||||
xbmc.executebuiltin('XBMC.ReloadSkin()')
|
||||
|
||||
|
||||
def search_library_path():
|
||||
@@ -538,26 +524,26 @@ def search_library_path():
|
||||
return None
|
||||
|
||||
|
||||
def set_content(content_type, silent=False):
|
||||
def set_content(content_type, silent=False, custom=False):
|
||||
"""
|
||||
Procedimiento para auto-configurar la videoteca de kodi con los valores por defecto
|
||||
@type content_type: str ('movie' o 'tvshow')
|
||||
@param content_type: tipo de contenido para configurar, series o peliculas
|
||||
"""
|
||||
logger.info()
|
||||
continuar = True
|
||||
msg_text = ""
|
||||
videolibrarypath = config.get_setting("videolibrarypath")
|
||||
forced = config.get_setting('videolibrary_kodi_force')
|
||||
|
||||
if content_type == 'movie':
|
||||
scraper = [config.get_localized_string(70093), config.get_localized_string(70096)]
|
||||
if forced:
|
||||
if not custom:
|
||||
seleccion = 0 # tmdb
|
||||
else:
|
||||
seleccion = platformtools.dialog_select(config.get_localized_string(70094), scraper)
|
||||
|
||||
|
||||
# Instalar The Movie Database
|
||||
# Instalar The Movie Database
|
||||
if seleccion == -1 or seleccion == 0:
|
||||
if not xbmc.getCondVisibility('System.HasAddon(metadata.themoviedb.org)'):
|
||||
if not silent:
|
||||
@@ -577,9 +563,8 @@ def set_content(content_type, silent=False):
|
||||
continuar = (install and xbmc.getCondVisibility('System.HasAddon(metadata.themoviedb.org)'))
|
||||
if not continuar:
|
||||
msg_text = config.get_localized_string(60047)
|
||||
|
||||
if continuar:
|
||||
xbmc.executebuiltin('xbmc.addon.opensettings(metadata.themoviedb.org)', True)
|
||||
xbmc.executebuiltin('Addon.OpenSettings(metadata.themoviedb.org)', True)
|
||||
|
||||
# Instalar Universal Movie Scraper
|
||||
elif seleccion == 1:
|
||||
@@ -603,11 +588,11 @@ def set_content(content_type, silent=False):
|
||||
if not continuar:
|
||||
msg_text = config.get_localized_string(70097)
|
||||
if continuar:
|
||||
xbmc.executebuiltin('xbmc.addon.opensettings(metadata.universal)', True)
|
||||
xbmc.executebuiltin('Addon.OpenSettings(metadata.universal)', True)
|
||||
|
||||
else: # SERIES
|
||||
scraper = [config.get_localized_string(70098), config.get_localized_string(70093)]
|
||||
if forced:
|
||||
if not custom:
|
||||
seleccion = 0 # tvdb
|
||||
else:
|
||||
seleccion = platformtools.dialog_select(config.get_localized_string(70107), scraper)
|
||||
@@ -631,9 +616,9 @@ def set_content(content_type, silent=False):
|
||||
|
||||
continuar = (install and xbmc.getCondVisibility('System.HasAddon(metadata.tvdb.com)'))
|
||||
if not continuar:
|
||||
msg_text = config.get_localized_string(70099)
|
||||
msg_text = config.get_localized_string(60049)
|
||||
if continuar:
|
||||
xbmc.executebuiltin('xbmc.addon.opensettings(metadata.tvdb.com)', True)
|
||||
xbmc.executebuiltin('Addon.OpenSettings(metadata.tvdb.com)', True)
|
||||
|
||||
# Instalar The Movie Database
|
||||
elif seleccion == 1:
|
||||
@@ -641,7 +626,7 @@ def set_content(content_type, silent=False):
|
||||
continuar = False
|
||||
if not silent:
|
||||
# Preguntar si queremos instalar metadata.tvshows.themoviedb.org
|
||||
install = platformtools.dialog_yesno(config.get_localized_string(70100))
|
||||
install = platformtools.dialog_yesno(config.get_localized_string(60050))
|
||||
else:
|
||||
install = True
|
||||
|
||||
@@ -656,9 +641,9 @@ def set_content(content_type, silent=False):
|
||||
|
||||
continuar = (install and continuar)
|
||||
if not continuar:
|
||||
msg_text = config.get_localized_string(60047)
|
||||
msg_text = config.get_localized_string(60051)
|
||||
if continuar:
|
||||
xbmc.executebuiltin('xbmc.addon.opensettings(metadata.tvshows.themoviedb.org)', True)
|
||||
xbmc.executebuiltin('Addon.OpenSettings(metadata.tvshows.themoviedb.org)', True)
|
||||
|
||||
idPath = 0
|
||||
idParentPath = 0
|
||||
@@ -719,6 +704,9 @@ def set_content(content_type, silent=False):
|
||||
elif seleccion == 1:
|
||||
strScraper = 'metadata.universal'
|
||||
path_settings = xbmc.translatePath("special://profile/addon_data/metadata.universal/settings.xml")
|
||||
if not os.path.exists(path_settings):
|
||||
logger.info("%s: %s" % (content_type, path_settings + " doesn't exist"))
|
||||
return continuar
|
||||
settings_data = filetools.read(path_settings)
|
||||
strSettings = ' '.join(settings_data.split()).replace("> <", "><")
|
||||
strSettings = strSettings.replace("\"","\'")
|
||||
@@ -735,6 +723,9 @@ def set_content(content_type, silent=False):
|
||||
elif seleccion == 1:
|
||||
strScraper = 'metadata.tvshows.themoviedb.org'
|
||||
path_settings = xbmc.translatePath("special://profile/addon_data/metadata.tvshows.themoviedb.org/settings.xml")
|
||||
if not os.path.exists(path_settings):
|
||||
logger.info("%s: %s" % (content_type, path_settings + " doesn't exist"))
|
||||
return continuar
|
||||
settings_data = filetools.read(path_settings)
|
||||
strSettings = ' '.join(settings_data.split()).replace("> <", "><")
|
||||
strSettings = strSettings.replace("\"","\'")
|
||||
@@ -777,16 +768,258 @@ def set_content(content_type, silent=False):
|
||||
|
||||
if not continuar:
|
||||
heading = config.get_localized_string(70102) % content_type
|
||||
elif content_type == 'SERIES' and not xbmc.getCondVisibility(
|
||||
elif content_type == 'tvshow' and not xbmc.getCondVisibility(
|
||||
'System.HasAddon(metadata.tvshows.themoviedb.org)'):
|
||||
heading = config.get_localized_string(70103) % content_type
|
||||
msg_text = config.get_localized_string(60058)
|
||||
else:
|
||||
heading = config.get_localized_string(70103) % content_type
|
||||
msg_text = config.get_localized_string(70104)
|
||||
platformtools.dialog_notification(heading, msg_text, icon=1, time=3000)
|
||||
|
||||
logger.info("%s: %s" % (heading, msg_text))
|
||||
return continuar
|
||||
|
||||
|
||||
def update_db(old_path, new_path, old_movies_folder, new_movies_folder, old_tvshows_folder, new_tvshows_folder, progress):
|
||||
def path_replace(path, old, new):
|
||||
if new.startswith("special://") or '://' in new: sep = '/'
|
||||
else: sep = os.sep
|
||||
|
||||
path = path.replace(old,new)
|
||||
if sep == '/': path = path.replace('\\','/')
|
||||
else: path = path.replace('/','\\')
|
||||
|
||||
return path
|
||||
|
||||
logger.info()
|
||||
|
||||
sql_old_path = old_path
|
||||
if sql_old_path.startswith("special://"):
|
||||
sql_old_path = sql_old_path.replace('/profile/', '/%/').replace('/home/userdata/', '/%/')
|
||||
sep = '/'
|
||||
elif '://' in sql_old_path:
|
||||
sep = '/'
|
||||
else: sep = os.sep
|
||||
if not sql_old_path.endswith(sep):
|
||||
sql_old_path += sep
|
||||
|
||||
# search MAIN path in the DB
|
||||
sql = 'SELECT idPath, strPath FROM path where strPath LIKE "%s"' % sql_old_path
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
|
||||
# change main path
|
||||
if records:
|
||||
idPath = records[0][0]
|
||||
strPath = path_replace(records[0][1], old_path, new_path)
|
||||
sql = 'UPDATE path SET strPath="%s" WHERE idPath=%s' % (strPath, idPath)
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
|
||||
p = 80
|
||||
progress.update(p, config.get_localized_string(20000), config.get_localized_string(80013))
|
||||
|
||||
for OldFolder, NewFolder in [[old_movies_folder, new_movies_folder], [old_tvshows_folder, new_tvshows_folder]]:
|
||||
sql_old_folder = sql_old_path + OldFolder
|
||||
if not sql_old_folder.endswith(sep): sql_old_folder += sep
|
||||
|
||||
# Search Main Sub Folder
|
||||
sql = 'SELECT idPath, strPath FROM path where strPath LIKE "%s"' % sql_old_folder
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
|
||||
# Change Main Sub Folder
|
||||
if records:
|
||||
for record in records:
|
||||
idPath = record[0]
|
||||
strPath = path_replace(record[1], filetools.join(old_path, OldFolder), filetools.join(new_path, NewFolder))
|
||||
sql = 'UPDATE path SET strPath="%s" WHERE idPath=%s' % (strPath, idPath)
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
|
||||
# Search if Sub Folder exixt in all paths
|
||||
sql_old_folder += '%'
|
||||
sql = 'SELECT idPath, strPath FROM path where strPath LIKE "%s"' % sql_old_folder
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
|
||||
#Change Sub Folder in all paths
|
||||
if records:
|
||||
for record in records:
|
||||
idPath = record[0]
|
||||
strPath = path_replace(record[1], filetools.join(old_path, OldFolder), filetools.join(new_path, NewFolder))
|
||||
sql = 'UPDATE path SET strPath="%s" WHERE idPath=%s' % (strPath, idPath)
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
|
||||
|
||||
if OldFolder == old_movies_folder:
|
||||
# if is Movie Folder
|
||||
# search and modify in "movie"
|
||||
sql = 'SELECT idMovie, c22 FROM movie where c22 LIKE "%s"' % sql_old_folder
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
if records:
|
||||
for record in records:
|
||||
idMovie = record[0]
|
||||
strPath = path_replace(record[1], filetools.join(old_path, OldFolder), filetools.join(new_path, NewFolder))
|
||||
sql = 'UPDATE movie SET c22="%s" WHERE idMovie=%s' % (strPath, idMovie)
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
else:
|
||||
# if is TV Show Folder
|
||||
# search and modify in "episode"
|
||||
sql = 'SELECT idEpisode, c18 FROM episode where c18 LIKE "%s"' % sql_old_folder
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
if records:
|
||||
for record in records:
|
||||
idEpisode = record[0]
|
||||
strPath = path_replace(record[1], filetools.join(old_path, OldFolder), filetools.join(new_path, NewFolder))
|
||||
sql = 'UPDATE episode SET c18="%s" WHERE idEpisode=%s' % (strPath, idEpisode)
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
p += 5
|
||||
progress.update(p, config.get_localized_string(20000), config.get_localized_string(80013))
|
||||
|
||||
progress.update(100)
|
||||
xbmc.sleep(1000)
|
||||
progress.close()
|
||||
xbmc.executebuiltin('XBMC.ReloadSkin()')
|
||||
|
||||
|
||||
def clean(path=''):
|
||||
def sql_format(path):
|
||||
if path.startswith("special://"):
|
||||
path = path.replace('/profile/', '/%/').replace('/home/userdata/', '/%/')
|
||||
sep = '/'
|
||||
elif '://' in path:
|
||||
sep = '/'
|
||||
else: sep = os.sep
|
||||
|
||||
if sep == '/': path = path.replace('\\','/')
|
||||
else: path = path.replace('/','\\')
|
||||
|
||||
return path, sep
|
||||
|
||||
logger.info()
|
||||
|
||||
idParentPath = 0
|
||||
sql_path = ''
|
||||
sql_movies_path = ''
|
||||
sql_tvshows_path = ''
|
||||
sql_episodes_path = ''
|
||||
|
||||
path, sep = sql_format(path)
|
||||
movies_folder = config.get_setting("folder_movies")
|
||||
tvshows_folder = config.get_setting("folder_tvshows")
|
||||
|
||||
# delete episode/movie (downloads.py move_to_libray)
|
||||
if path.endswith(".strm"):
|
||||
if movies_folder in path:
|
||||
sql_movies_path = path
|
||||
else:
|
||||
sql_episodes_path = path
|
||||
# delete movie
|
||||
elif movies_folder in path:
|
||||
if not path.endswith(sep): path += sep
|
||||
|
||||
sql_movies_path = path + '%'
|
||||
# delete tvshow
|
||||
elif tvshows_folder in path:
|
||||
if not path.endswith(sep): path += sep
|
||||
|
||||
sql_tvshows_path = path + '%'
|
||||
|
||||
sql_episodes_path = sql_tvshows_path
|
||||
# delete video library
|
||||
else:
|
||||
if not path.endswith(sep): path += sep
|
||||
|
||||
sql_path = path
|
||||
|
||||
sql_movies_path = sql_path + movies_folder
|
||||
if not sql_movies_path.endswith(sep): sql_movies_path += sep
|
||||
sql_movies_path += '%'
|
||||
|
||||
sql_tvshows_path = sql_path + tvshows_folder
|
||||
if not sql_tvshows_path.endswith(sep): sql_tvshows_path += sep
|
||||
sql_tvshows_path += '%'
|
||||
|
||||
sql_episodes_path = sql_tvshows_path
|
||||
|
||||
progress = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(80025))
|
||||
progress.update(0)
|
||||
if sql_path:
|
||||
# search video library path in the DB
|
||||
sql = 'SELECT idPath FROM path where strPath LIKE "%s"' % sql_path
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
# delete video library path
|
||||
if records:
|
||||
idPath = records[0][0]
|
||||
idParentPath = idPath
|
||||
if not config.get_setting("videolibrary_kodi"):
|
||||
sql = 'DELETE from path WHERE idPath=%s' % idPath
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
|
||||
progress.update(10)
|
||||
if sql_movies_path:
|
||||
# search movies in the DB
|
||||
sql = 'SELECT idMovie FROM movie where c22 LIKE "%s"' % sql_movies_path
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
# delete movies
|
||||
if records:
|
||||
for record in records:
|
||||
idMovie = record[0]
|
||||
sql = 'DELETE from movie WHERE idMovie=%s' % idMovie
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
|
||||
progress.update(28)
|
||||
if sql_movies_path:
|
||||
# search movies path and folders in the DB
|
||||
sql = 'SELECT idPath, idParentPath FROM path where strPath LIKE "%s"' % sql_movies_path
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
# delete movies path and folders
|
||||
if records:
|
||||
for record in records:
|
||||
if record[1] == idParentPath and config.get_setting("videolibrary_kodi"):
|
||||
continue
|
||||
idPath = record[0]
|
||||
sql = 'DELETE from path WHERE idPath=%s' % idPath
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
|
||||
progress.update(46)
|
||||
if sql_tvshows_path:
|
||||
# search TV shows in the DB
|
||||
sql = 'SELECT idShow FROM tvshow_view where strPath LIKE "%s"' % sql_tvshows_path
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
# delete TV shows
|
||||
if records:
|
||||
for record in records:
|
||||
idShow = record[0]
|
||||
sql = 'DELETE from tvshow WHERE idShow=%s' % idShow
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
|
||||
progress.update(64)
|
||||
if sql_episodes_path:
|
||||
# search episodes in the DB
|
||||
sql = 'SELECT idEpisode FROM episode where c18 LIKE "%s"' % sql_episodes_path
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
# delete episodes
|
||||
if records:
|
||||
for record in records:
|
||||
idEpisode = record[0]
|
||||
sql = 'DELETE from episode WHERE idEpisode=%s' % idEpisode
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
|
||||
progress.update(82)
|
||||
if sql_tvshows_path:
|
||||
# search TV shows path and folders in the DB
|
||||
sql = 'SELECT idPath, idParentPath FROM path where strPath LIKE "%s"' % sql_tvshows_path
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
# delete tvshows path and folders
|
||||
if records:
|
||||
for record in records:
|
||||
if record[1] == idParentPath and config.get_setting("videolibrary_kodi"):
|
||||
continue
|
||||
idPath = record[0]
|
||||
sql = 'DELETE from path WHERE idPath=%s' % idPath
|
||||
nun_records, records = execute_sql_kodi(sql)
|
||||
|
||||
progress.update(100)
|
||||
xbmc.sleep(1000)
|
||||
progress.close()
|
||||
xbmc.executebuiltin('XBMC.ReloadSkin()')
|
||||
|
||||
|
||||
def execute_sql_kodi(sql):
|
||||
@@ -854,101 +1087,175 @@ def execute_sql_kodi(sql):
|
||||
return nun_records, records
|
||||
|
||||
|
||||
def add_sources(path):
|
||||
def check_sources(new_movies_path='', new_tvshows_path=''):
|
||||
def format_path(path):
|
||||
if path.startswith("special://") or '://' in path: sep = '/'
|
||||
else: sep = os.sep
|
||||
if not path.endswith(sep): path += sep
|
||||
return path
|
||||
|
||||
logger.info()
|
||||
from xml.dom import minidom
|
||||
|
||||
new_movies_path = format_path(new_movies_path)
|
||||
new_tvshows_path = format_path(new_tvshows_path)
|
||||
|
||||
SOURCES_PATH = xbmc.translatePath("special://userdata/sources.xml")
|
||||
|
||||
if os.path.exists(SOURCES_PATH):
|
||||
if filetools.isfile(SOURCES_PATH):
|
||||
xmldoc = minidom.parse(SOURCES_PATH)
|
||||
|
||||
video_node = xmldoc.childNodes[0].getElementsByTagName("video")[0]
|
||||
paths_node = video_node.getElementsByTagName("path")
|
||||
list_path = [p.firstChild.data for p in paths_node]
|
||||
|
||||
return new_movies_path in list_path, new_tvshows_path in list_path
|
||||
else:
|
||||
# Crear documento
|
||||
xmldoc = minidom.Document()
|
||||
nodo_sources = xmldoc.createElement("sources")
|
||||
source_nodes = xmldoc.createElement("sources")
|
||||
|
||||
for type in ['programs', 'video', 'music', 'picture', 'files']:
|
||||
nodo_type = xmldoc.createElement(type)
|
||||
element_default = xmldoc.createElement("default")
|
||||
element_default.setAttribute("pathversion", "1")
|
||||
nodo_type.appendChild(element_default)
|
||||
nodo_sources.appendChild(nodo_type)
|
||||
xmldoc.appendChild(nodo_sources)
|
||||
source_nodes.appendChild(nodo_type)
|
||||
xmldoc.appendChild(source_nodes)
|
||||
|
||||
# Buscamos el nodo video
|
||||
nodo_video = xmldoc.childNodes[0].getElementsByTagName("video")[0]
|
||||
|
||||
# Buscamos el path dentro de los nodos_path incluidos en el nodo_video
|
||||
nodos_paths = nodo_video.getElementsByTagName("path")
|
||||
list_path = [p.firstChild.data for p in nodos_paths]
|
||||
logger.debug(list_path)
|
||||
if path in list_path:
|
||||
logger.debug("La ruta %s ya esta en sources.xml" % path)
|
||||
return
|
||||
logger.debug("La ruta %s NO esta en sources.xml" % path)
|
||||
|
||||
# Si llegamos aqui es por q el path no esta en sources.xml, asi q lo incluimos
|
||||
nodo_source = xmldoc.createElement("source")
|
||||
|
||||
# Nodo <name>
|
||||
nodo_name = xmldoc.createElement("name")
|
||||
sep = os.sep
|
||||
if path.startswith("special://") or scrapertools.find_single_match(path, '(^\w+:\/\/)'):
|
||||
sep = "/"
|
||||
name = path
|
||||
if path.endswith(sep):
|
||||
name = path[:-1]
|
||||
nodo_name.appendChild(xmldoc.createTextNode(name.rsplit(sep)[-1]))
|
||||
nodo_source.appendChild(nodo_name)
|
||||
|
||||
# Nodo <path>
|
||||
nodo_path = xmldoc.createElement("path")
|
||||
nodo_path.setAttribute("pathversion", "1")
|
||||
nodo_path.appendChild(xmldoc.createTextNode(path))
|
||||
nodo_source.appendChild(nodo_path)
|
||||
|
||||
# Nodo <allowsharing>
|
||||
nodo_allowsharing = xmldoc.createElement("allowsharing")
|
||||
nodo_allowsharing.appendChild(xmldoc.createTextNode('true'))
|
||||
nodo_source.appendChild(nodo_allowsharing)
|
||||
|
||||
# Añadimos <source> a <video>
|
||||
nodo_video.appendChild(nodo_source)
|
||||
|
||||
# Guardamos los cambios
|
||||
if not PY3:
|
||||
filetools.write(SOURCES_PATH,
|
||||
'\n'.join([x for x in xmldoc.toprettyxml().encode("utf-8").splitlines() if x.strip()]))
|
||||
else:
|
||||
filetools.write(SOURCES_PATH,
|
||||
b'\n'.join([x for x in xmldoc.toprettyxml().encode("utf-8").splitlines() if x.strip()]),
|
||||
vfs=False)
|
||||
return False, False
|
||||
|
||||
|
||||
def ask_set_content(flag, silent=False):
|
||||
|
||||
def update_sources(new='', old=''):
|
||||
logger.info()
|
||||
if new == old: return
|
||||
|
||||
SOURCES_PATH = xbmc.translatePath("special://userdata/sources.xml")
|
||||
if filetools.isfile(SOURCES_PATH):
|
||||
xmldoc = minidom.parse(SOURCES_PATH)
|
||||
else:
|
||||
xmldoc = minidom.Document()
|
||||
source_nodes = xmldoc.createElement("sources")
|
||||
|
||||
for type in ['programs', 'video', 'music', 'picture', 'files']:
|
||||
nodo_type = xmldoc.createElement(type)
|
||||
element_default = xmldoc.createElement("default")
|
||||
element_default.setAttribute("pathversion", "1")
|
||||
nodo_type.appendChild(element_default)
|
||||
source_nodes.appendChild(nodo_type)
|
||||
xmldoc.appendChild(source_nodes)
|
||||
|
||||
# collect nodes
|
||||
# nodes = xmldoc.getElementsByTagName("video")
|
||||
video_node = xmldoc.childNodes[0].getElementsByTagName("video")[0]
|
||||
paths_node = video_node.getElementsByTagName("path")
|
||||
|
||||
if old:
|
||||
# delete old path
|
||||
for node in paths_node:
|
||||
if node.firstChild.data == old:
|
||||
parent = node.parentNode
|
||||
remove = parent.parentNode
|
||||
remove.removeChild(parent)
|
||||
|
||||
# write changes
|
||||
if sys.version_info[0] >= 3: #PY3
|
||||
filetools.write(SOURCES_PATH, '\n'.join([x for x in xmldoc.toprettyxml().splitlines() if x.strip()]))
|
||||
else:
|
||||
filetools.write(SOURCES_PATH, '\n'.join([x for x in xmldoc.toprettyxml().splitlines() if x.strip()]), vfs=False)
|
||||
logger.debug("The path %s has been removed from sources.xml" % old)
|
||||
|
||||
if new:
|
||||
# create new path
|
||||
list_path = [p.firstChild.data for p in paths_node]
|
||||
if new in list_path:
|
||||
logger.info("The path %s already exists in sources.xml" % new)
|
||||
return
|
||||
logger.info("The path %s does not exist in sources.xml" % new)
|
||||
|
||||
# if the path does not exist we create one
|
||||
source_node = xmldoc.createElement("source")
|
||||
|
||||
# <name> Node
|
||||
name_node = xmldoc.createElement("name")
|
||||
sep = os.sep
|
||||
if new.startswith("special://") or scrapertools.find_single_match(new, r'(^\w+:\/\/)'):
|
||||
sep = "/"
|
||||
name = new
|
||||
if new.endswith(sep):
|
||||
name = new[:-1]
|
||||
name_node.appendChild(xmldoc.createTextNode(name.rsplit(sep)[-1]))
|
||||
source_node.appendChild(name_node)
|
||||
|
||||
# <path> Node
|
||||
path_node = xmldoc.createElement("path")
|
||||
path_node.setAttribute("pathversion", "1")
|
||||
path_node.appendChild(xmldoc.createTextNode(new))
|
||||
source_node.appendChild(path_node)
|
||||
|
||||
# <allowsharing> Node
|
||||
allowsharing_node = xmldoc.createElement("allowsharing")
|
||||
allowsharing_node.appendChild(xmldoc.createTextNode('true'))
|
||||
source_node.appendChild(allowsharing_node)
|
||||
|
||||
# Añadimos <source> a <video>
|
||||
video_node.appendChild(source_node)
|
||||
|
||||
# write changes
|
||||
if sys.version_info[0] >= 3: #PY3
|
||||
filetools.write(SOURCES_PATH, '\n'.join([x for x in xmldoc.toprettyxml().splitlines() if x.strip()]))
|
||||
else:
|
||||
filetools.write(SOURCES_PATH, '\n'.join([x for x in xmldoc.toprettyxml().splitlines() if x.strip()]), vfs=False)
|
||||
logger.debug("The path %s has been added to sources.xml" % new)
|
||||
|
||||
|
||||
def ask_set_content(silent=False):
|
||||
logger.info()
|
||||
logger.debug("videolibrary_kodi_flag %s" % config.get_setting("videolibrary_kodi_flag"))
|
||||
logger.debug("videolibrary_kodi %s" % config.get_setting("videolibrary_kodi"))
|
||||
|
||||
def do_config():
|
||||
logger.debug("hemos aceptado")
|
||||
config.set_setting("videolibrary_kodi", True)
|
||||
set_content("movie", silent=True)
|
||||
set_content("tvshow", silent=True)
|
||||
add_sources(config.get_setting("videolibrarypath"))
|
||||
add_sources(config.get_setting("downloadpath"))
|
||||
|
||||
if not silent:
|
||||
heading = config.get_localized_string(59971)
|
||||
linea1 = config.get_localized_string(70105)
|
||||
linea2 = config.get_localized_string(70106)
|
||||
if platformtools.dialog_yesno(heading, linea1, linea2):
|
||||
do_config()
|
||||
def do_config(custom=False):
|
||||
if set_content("movie", True, custom) and set_content("tvshow", True, custom):
|
||||
platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(70104))
|
||||
config.set_setting("videolibrary_kodi", True)
|
||||
update()
|
||||
else:
|
||||
# no hemos aceptado
|
||||
platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80024))
|
||||
config.set_setting("videolibrary_kodi", False)
|
||||
|
||||
else:
|
||||
do_config()
|
||||
# configuration during installation
|
||||
if not silent:
|
||||
# ask to configure Kodi video library
|
||||
if platformtools.dialog_yesno(config.get_localized_string(20000), config.get_localized_string(80015)):
|
||||
# ask for custom or default settings
|
||||
if not platformtools.dialog_yesno(config.get_localized_string(80026), config.get_localized_string(80016), "", "", config.get_localized_string(80017), config.get_localized_string(80018)):
|
||||
# input path and folders
|
||||
path = platformtools.dialog_browse(3, config.get_localized_string(80019), config.get_setting("videolibrarypath"))
|
||||
movies_folder = platformtools.dialog_input(config.get_setting("folder_movies"), config.get_localized_string(80020))
|
||||
tvshows_folder = platformtools.dialog_input(config.get_setting("folder_tvshows"), config.get_localized_string(80021))
|
||||
|
||||
config.set_setting("videolibrary_kodi_flag", flag)
|
||||
if path != "" and movies_folder != "" and tvshows_folder != "":
|
||||
movies_path, tvshows_path = check_sources(filetools.join(path, movies_folder), filetools.join(path, tvshows_folder))
|
||||
# configure later
|
||||
if movies_path or tvshows_path:
|
||||
platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80029))
|
||||
# set path and folders
|
||||
else:
|
||||
update_sources(path, config.get_setting("videolibrarypath"))
|
||||
config.set_setting("videolibrarypath", path)
|
||||
config.set_setting("folder_movies", movies_folder)
|
||||
config.set_setting("folder_tvshows", tvshows_folder)
|
||||
config.verify_directories_created()
|
||||
do_config(True)
|
||||
# default path and folders
|
||||
else:
|
||||
platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80030))
|
||||
do_config(True)
|
||||
# default settings
|
||||
else:
|
||||
platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80027))
|
||||
do_config(False)
|
||||
# configure later
|
||||
else:
|
||||
platformtools.dialog_ok(config.get_localized_string(20000), config.get_localized_string(80022))
|
||||
# configuration from the settings menu
|
||||
else:
|
||||
platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80023))
|
||||
do_config(True)
|
||||
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 14 KiB |
@@ -2,15 +2,15 @@
|
||||
<settings>
|
||||
<!-- General -->
|
||||
<category label="70168">
|
||||
<setting id="autostart" type="action" label="70706" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiYXV0b3N0YXJ0IiwNCiAgICAiY2hhbm5lbCI6ICJzZXR0aW5nIg0KfQ==)"/>
|
||||
<setting type="sep"/>
|
||||
<setting id="thumbnail_type" type="select" lvalues="30011|30012|30200" label="30010" default="2"/>
|
||||
<setting id="channel_language" type="select" values="auto|all|ita" label="30019" default="all"/>
|
||||
<setting id="forceview" type="bool" label="30043" default="false"/>
|
||||
<!-- <setting id="faster_item_serialization" type="bool" label="30300" default="false"/> -->
|
||||
<setting type="sep"/>
|
||||
<setting id="trakt_sync" type="bool" label="70109" default="false"/>
|
||||
<setting label="70786" type="lsep"/>
|
||||
<setting id="autostart" type="action" label="70706" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiYXV0b3N0YXJ0IiwNCiAgICAiY2hhbm5lbCI6ICJzZXR0aW5nIg0KfQ==)" default="Off"/>
|
||||
<setting label="70579" type="lsep"/>
|
||||
<setting id="addon_update_enabled" type="bool" label="70581" default="true"/>
|
||||
<setting id="addon_update_message" type="bool" label="70582" default="true"/>
|
||||
<setting id="addon_update_timer" type="slider" option="int" range="1,1,24" label="707416" default="1"/>
|
||||
<setting label="70787" type="lsep"/>
|
||||
<setting id="resolver_dns" type="bool" label="707408" default="true" enable="true" visible="true"/>
|
||||
<setting label="70788" type="lsep"/>
|
||||
<setting id="debug" type="bool" label="30003" default="false"/>
|
||||
</category>
|
||||
|
||||
@@ -19,97 +19,38 @@
|
||||
<setting id="player_mode" type="select" lvalues="30026|30027|30028|30029" label="30044" default="1"/>
|
||||
<setting id="default_action" type="select" lvalues="30006|30007|30008" label="30005" default="0"/>
|
||||
<setting id="autoplay" type="bool" label="70562" default="false" visible="true"/>
|
||||
<setting id="hide_servers" type="bool" label="70747" default="false" visible="eq(-1,true)"/>
|
||||
<setting id="hide_servers" type="bool" label="70747" default="false" visible="eq(-1,true)" subsetting="true"/>
|
||||
<setting id="checklinks" type="bool" label="30020" default="false"/>
|
||||
<setting id="checklinks_number" type="slider" option="int" range="5,5,20" label="30021" default="5" visible="eq(-1,true)"/>
|
||||
<setting id="checklinks_number" type="slider" option="int" range="5,5,20" label="30021" default="5" visible="eq(-1,true)" subsetting="true"/>
|
||||
</category>
|
||||
|
||||
<!-- Videolibrary -->
|
||||
<category label="30131">
|
||||
<setting label="30501" type="lsep"/>
|
||||
<setting id="videolibrarypath" type="folder" label="30067" default="special://profile/addon_data/plugin.video.kod/videolibrary"/>
|
||||
<setting id="folder_tvshows" type="text" label="70118" default="SERIES" subsetting="true"/>
|
||||
<setting id="folder_movies" type="text" label="70119" default="CINE" subsetting="true"/>
|
||||
|
||||
<!-- <setting id="videolibrarypath" type="action" label="30067" action="RunPlugin(plugin://plugin.video.kod/?ew0KCSJjaGFubmVsIjoibW92ZV92aWRlb2xpYnJhcnkiLA0KCSJhY3Rpb24iOiJzZXRfdmlkZW9saWJyYXJ5X3BhdGgiDQp9)" default="special://profile/addon_data/plugin.video.kod/videolibrary"/> -->
|
||||
<setting id="videolibrarypath" type="folder" label="30067" default="special://profile/addon_data/plugin.video.kod/videolibrary/" option="writeable"/>
|
||||
<setting id="folder_tvshows" type="text" label="70118" default="Serie TV"/>
|
||||
<setting id="folder_movies" type="text" label="70119" default="Film"/>
|
||||
<setting id="videolibrary_kodi" type="bool" label="70120" default="false"/>
|
||||
<setting id="settings_kod" type="action" label="70789" action=""/>
|
||||
<setting label="59997" type="lsep"/>
|
||||
<setting id="videolibrary_kodi_flag" type="number" label="" default="0" visible="false"/>
|
||||
<setting id="videolibrary_kodi_force" type="bool" label="" default="false" visible="false"/>
|
||||
<setting id="videolibrary_kodi" type="bool" label="70120" enable="lt(-1,2)+eq(0,false)" default="false"/>
|
||||
<setting id="videolibrary_max_quality" type="bool" label="70729" default="false" visible="true"/>
|
||||
<setting id="next_ep" type="select" label="70746" lvalues="70752|70747|70748" default="0"/>
|
||||
<setting id="next_ep_type" type="select" label="70754" lvalues="70755|70756|70757" default="0" visible="eq(-1,2)" subsetting="true"/>
|
||||
<setting id="next_ep_seconds" type="slider" option="int" range="20,10,120" label="70749" default="40" visible="!eq(-2,0)" subsetting="true"/>
|
||||
|
||||
<setting id="trakt_sync" type="bool" label="70109" default="false"/>
|
||||
<setting label="30030" type="lsep"/>
|
||||
<setting id="vidolibrary_preferences" type="action" label="60542" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiY2hhbm5lbF9jb25maWciLA0KICAgICJjaGFubmVsIjogInZpZGVvbGlicmFyeSINCn0==)"/>
|
||||
<setting id="vidolibrary_overwrite" type="action" label="60567" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAib3ZlcndyaXRlX3Rvb2xzIiwNCiAgICAiY2hhbm5lbCI6ICJzZXR0aW5nIg0KfQ==)"/>
|
||||
<setting id="vidolibrary_export" type="action" label="80000" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiZXhwb3J0X3ZpZGVvbGlicmFyeSIsDQogICAgImNoYW5uZWwiOiAiYmFja3VwIg0KfQ==)"/>
|
||||
<setting id="vidolibrary_import" type="action" label="80001" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiaW1wb3J0X3ZpZGVvbGlicmFyeSIsDQogICAgImNoYW5uZWwiOiAiYmFja3VwIg0KfQ==)"/>
|
||||
<setting id="vidolibrary_delete" type="action" label="80036" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiZGVsZXRlX3ZpZGVvbGlicmFyeSIsDQogICAgImNoYW5uZWwiOiAidmlkZW9saWJyYXJ5Ig0KfQ==)"/>
|
||||
<setting id="vidolibrary_restore" type="action" label="60567" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAicmVzdG9yZV90b29scyIsDQogICAgImNoYW5uZWwiOiAic2V0dGluZyINCn0=)"/>
|
||||
<setting id="vidolibrary_update" type="action" label="60568" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAidXBkYXRlX3ZpZGVvbGlicmFyeSIsDQogICAgImNoYW5uZWwiOiAidmlkZW9saWJyYXJ5Ig0KfQ==)"/>
|
||||
</category>
|
||||
|
||||
<!-- Search -->
|
||||
<category label="60423">
|
||||
<setting id="last_search" type="bool" label="60678" default="true" visible="true"/>
|
||||
<setting id="saved_searches_limit" type="slider" option="int" range="10,10,40" label="60677" default="10" visible="eq(-1,0)" subsetting="true"/>
|
||||
<setting id="result_mode" type="select" label="60657" lvalues="60675|60676" default="0"/>
|
||||
<setting id="thread_number" type="slider" label="60673" option="int" range="0,1,64" default="0"/>
|
||||
<setting id="search_channels" type="action" label="59994" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJvcGNpb25lcyIsDQogICAgImNoYW5uZWwiOiJzZWFyY2giDQp9)"/>
|
||||
</category>
|
||||
|
||||
<!-- Downloads -->
|
||||
<category label="30153">
|
||||
<setting id="downloadenabled" type="bool" label="70689" default="false"/>
|
||||
<setting id="downloadpath" type="folder" label="30017" visible="eq(-1,true)" default="special://profile/addon_data/plugin.video.kod/downloads" subsetting="true"/>
|
||||
<setting id="downloadlistpath" type="folder" label="30018" visible="eq(-2,true)" default="special://profile/addon_data/plugin.video.kod/downloads/list" subsetting="true"/>
|
||||
|
||||
<setting id="library_add" type="bool" label="70230" default="false"/>
|
||||
<setting id="library_move" type="bool" label="70231" default="false" visible="eq(-1,true)" subsetting="true"/>
|
||||
<setting id="browser" type="bool" label="70232" default="true"/>
|
||||
<setting id="server_speed" type="bool" label="70242" default="true"/>
|
||||
<setting id="quality" type="select" label="70240" lvalues="70241|70763|70764|70765" default="0"/>
|
||||
<setting id="download_adv" type="action" label="30030" action="RunPlugin(plugin://plugin.video.kod/?ew0KCSJhY3Rpb24iOiJjaGFubmVsX2NvbmZpZyIsDQoJImNvbmZpZyI6ImRvd25sb2FkcyIsDQogICAgImNoYW5uZWwiOiJzZXR0aW5nIg0KfQ==)"/>
|
||||
</category>
|
||||
|
||||
<!-- News -->
|
||||
<category label="60327">
|
||||
<setting label="60525" type="lsep"/>
|
||||
<setting id="news_films" type="action" label="60509" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoicGVsaWN1bGFzIg0KfQ==)"/>
|
||||
<setting id="news_series" type="action" label="60511" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoic2VyaWVzIg0KfQ==)"/>
|
||||
<setting id="news_anime" type="action" label="60512" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoiYW5pbWUiDQp9)"/>
|
||||
<setting id="news_documentaries" type="action" label="60513" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoiZG9jdW1lbnRhbGVzIg0KfQ==)"/>
|
||||
<setting type="lsep"/>
|
||||
<setting id="news_options" type="action" label="60415" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5ncyIsDQogICAgImNoYW5uZWwiOiJuZXdzIg0KfQ==)"/>
|
||||
</category>
|
||||
|
||||
<!-- Customization -->
|
||||
<category label="70126">
|
||||
<setting id="icon_set" type="select" label="70108" values="default|light|dark|alfa|mike" default="default"/>
|
||||
<setting id="enable_custom_theme" type="bool" label="70564" default="false"/>
|
||||
<setting id="custom_theme" type="folder" label="70565" default="" visible="eq(-1,true)"/>
|
||||
<setting id="video_thumbnail_type" type="select" label="70131" lvalues="70132|70133" default="0"/>
|
||||
<!-- Contextual -->
|
||||
<setting label="30024" type="lsep"/>
|
||||
<setting id="quick_menu" type="bool" label="60360" default="false"/>
|
||||
<setting id="side_menu" type="bool" label="70737" default="false"/>
|
||||
<setting id="kod_menu" type="bool" label="30025" default="false"/>
|
||||
<!-- Homepage -->
|
||||
<setting label="70716" type="lsep"/>
|
||||
<setting id="enable_news_menu" label="30130" type="bool" default="true"/>
|
||||
<setting id="enable_channels_menu" label="30118" type="bool" default="true"/>
|
||||
<setting id="enable_search_menu" label="30103" type="bool" default="true"/>
|
||||
<setting id="enable_onair_menu" label="50001" type="bool" default="true"/>
|
||||
<setting id="enable_link_menu" label="70527" type="bool" default="true"/>
|
||||
<setting id="enable_fav_menu" label="30102" type="bool" default="true"/>
|
||||
<setting id="enable_library_menu" label="30131" type="bool" default="true"/>
|
||||
<!-- Custom Start -->
|
||||
<setting label="70121" type="lsep"/>
|
||||
<setting id="start_page" type="bool" label="70121" default="false"/>
|
||||
<setting id="custom_start" type="bool" label="70122" default="false" visible="eq(-1,True)"/>
|
||||
<setting id="news_start" type="bool" label="70123" default="false" visible="eq(-2,True)" enable="eq(-1,False)+eq(-2,True"/>
|
||||
<setting id="category" type="action" label="70124" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZWxlY3QiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkiaWQiOiJjYXRlZ29yeSIsDQoJInR5cGUiOiJsYWJlbHMiLA0KCSJ2YWx1ZXMiOiI3MDEzN3wzMDEyM3wzMDEyNHw2MDUxMyIsDQoJImxhYmVsIjoiNzAxMjQiDQp9)" visible="eq(-3,True)+eq(-1,True)+eq(-2,False)" enable="eq(-3,True)+eq(-1,True)+(-2,false)"/>
|
||||
<!-- <setting id="category" type="select" label="70124" lvalues="70137|30123|30124|60513" default="Film" visible="eq(-3,True)+eq(-1,True)+eq(-2,False)" enable="eq(-3,True)+eq(-1,True)+(-2,false)"/> -->
|
||||
</category>
|
||||
|
||||
<!-- Channels -->
|
||||
<category label="30118" >
|
||||
<setting id="channel_language" type="select" values="auto|all|ita" label="30019" default="all"/>
|
||||
<setting id="channels_onoff" type="action" label="60545" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiY29uZl90b29scyIsDQogICAgImNoYW5uZWwiOiAic2V0dGluZyIsDQoJImV4dHJhIjogImNoYW5uZWxzX29ub2ZmIg0KfQ==)"/>
|
||||
<setting id="channels_config" type="action" label="60537" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiY2hhbm5lbHNfbWVudSIsDQogICAgImNoYW5uZWwiOiAic2hvcnRjdXRzIg0KfQ==)"/>
|
||||
<setting id="channels_check" type="action" label="60549" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiY2hlY2tfY2hhbm5lbHMiLA0KICAgICJjaGFubmVsIjogInNob3J0Y3V0cyINCn0==)"/>
|
||||
@@ -120,28 +61,25 @@
|
||||
<setting id="resolve_priority" type="select" label="70110" lvalues="70164|70165|70166" default="0"/>
|
||||
<setting id="resolve_stop" type="bool" label="70111" default="true"/>
|
||||
<setting id="hidepremium" type="bool" label="70112" default="false"/>
|
||||
<setting label="70578" type="lsep"/>
|
||||
<setting id="httptools_timeout" type="slider" option="int" range="0,5,120" label="70580" default="15"/>
|
||||
<setting label="60538" type="lsep"/>
|
||||
<setting label="70145" type="lsep"/>
|
||||
<setting id="servers_favorites" type="action" label="60551" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAic2VydmVyc19mYXZvcml0ZXMiLA0KICAgICJjaGFubmVsIjogInNldHRpbmciDQp9==)"/>
|
||||
<setting id="servers_blacklist" type="action" label="60550" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAic2VydmVyc19ibGFja2xpc3QiLA0KICAgICJjaGFubmVsIjogInNldHRpbmciDQp9==)"/>
|
||||
<setting id="servers_config" type="action" label="60538" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAic2VydmVyc19tZW51IiwNCiAgICAiY2hhbm5lbCI6ICJzaG9ydGN1dHMiDQp9==)"/>
|
||||
<setting id="debriders_config" type="action" label="60552" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAic2VydmVyc19tZW51IiwNCiAgICAiY2hhbm5lbCI6ICJzaG9ydGN1dHMiLA0KCSJ0eXBlIjogImRlYnJpZGVycyINCn0==)"/>
|
||||
<setting label="70578" type="lsep"/>
|
||||
<setting id="torrent_config" type="action" label="70253" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX3RvcnJlbnQiLA0KICAgICJjaGFubmVsIjoic2V0dGluZyINCn0=)"/>
|
||||
<setting id="quasar_install" type="action" label="70785" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJkb3dubG9hZCIsDQogICAgImNoYW5uZWwiOiJxdWFzYXJfZG93bmxvYWQiDQp9)"/>
|
||||
</category>
|
||||
|
||||
<!-- Other -->
|
||||
<category label="70149">
|
||||
<setting label="70150" type="lsep"/>
|
||||
<setting id="infoplus" type="bool" label="70151" default="false"/>
|
||||
<setting id="infoplus_set" type="bool" label="70128" visible="eq(-1,true)" default="false" subsetting="true"/>
|
||||
<setting id="extended_info" type="bool" label="70152" default="false"/>
|
||||
|
||||
<setting label="70153" type="lsep"/>
|
||||
<setting id="shortcut_key" type="action" label="30999" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAia2V5bWFwIg0KfQ==)"/>
|
||||
<setting id="delete_key" type="action" label="31000" action="RunPlugin(plugin://plugin.video.kod/?ewogICAgImFjdGlvbiI6ICJkZWxldGVfa2V5Igp9==)"/>
|
||||
|
||||
|
||||
<!-- Search -->
|
||||
<category label="60423">
|
||||
<setting label="60422" type="lsep"/>
|
||||
<setting id="last_search" type="bool" label="60678" default="true" visible="true"/>
|
||||
<setting id="saved_searches_limit" type="slider" option="int" range="10,10,40" label="60677" default="10" visible="eq(-1,0)" subsetting="true"/>
|
||||
<setting id="result_mode" type="select" label="60657" lvalues="60675|60676" default="0"/>
|
||||
<setting id="thread_number" type="slider" label="60673" option="int" range="0,1,64" default="0"/>
|
||||
<setting id="search_channels" type="action" label="59994" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJvcGNpb25lcyIsDQogICAgImNoYW5uZWwiOiJzZWFyY2giDQp9)"/>
|
||||
<setting label="70154" type="lsep"/>
|
||||
<setting id="tmdb_active" default="true" visible="false"/>
|
||||
<setting id="tmdb_threads" type="slider" option="int" range="5,5,30" label="70155" default="20"/>
|
||||
@@ -149,14 +87,80 @@
|
||||
<setting id="tmdb_cache" type="bool" label="70157" default="true"/>
|
||||
<setting id="tmdb_cache_expire" type="select" lvalues="70158|70159|70160|70161|70170" label="70162" enable="eq(-1,true)" default="4"/>
|
||||
<setting id="tmdb_clean_db_cache" type="action" label="70163" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAic2NyaXB0Ig0KfQ==)" />
|
||||
|
||||
<setting label="70579" type="lsep"/>
|
||||
<setting id="addon_update_enabled" type="bool" label="70581" default="true"/>
|
||||
<setting id="addon_update_message" type="bool" label="70582" default="true"/>
|
||||
<setting id="addon_update_timer" type="slider" option="int" range="1,1,24" label="707416" default="1"/>
|
||||
|
||||
<setting label="Lista activa" type="text" id="lista_activa" default="kodfavorites-default.json" visible="false"/>
|
||||
</category>
|
||||
|
||||
<!-- Downloads -->
|
||||
<category label="30153">
|
||||
<setting id="downloadenabled" type="bool" label="70689" default="false"/>
|
||||
<setting id="downloadpath" type="folder" label="30017" visible="eq(-1,true)" default="special://profile/addon_data/plugin.video.kod/downloads/" option="writeable"/>
|
||||
<setting id="settings_kod1" type="action" label="70789" action="" visible="eq(-2,true)"/>
|
||||
<setting id="downloadlistpath" type="folder" label="30018" visible="eq(-3,true)" default="special://profile/addon_data/plugin.video.kod/downloads/list/" option="writeable"/>
|
||||
<!-- <setting id="library_add" type="bool" label="70230" default="false"/>
|
||||
<setting id="library_move" type="bool" label="70231" default="false" visible="eq(-1,true)" subsetting="true"/> -->
|
||||
<setting id="library_move" type="bool" label="70231" visible="eq(-4,true)" default="true"/>
|
||||
<setting id="browser" type="bool" label="70232" visible="eq(-5,true)" default="true"/>
|
||||
<setting id="server_speed" type="bool" label="70242" visible="eq(-6,true)" default="true"/>
|
||||
<setting id="quality" type="select" label="70240" lvalues="70241|70763|70764|70765" visible="eq(-7,true)" default="0"/>
|
||||
<setting id="download_adv" type="action" label="30030" visible="eq(-8,true)" action="RunPlugin(plugin://plugin.video.kod/?ew0KCSJhY3Rpb24iOiJjaGFubmVsX2NvbmZpZyIsDQoJImNvbmZpZyI6ImRvd25sb2FkcyIsDQogICAgImNoYW5uZWwiOiJzZXR0aW5nIg0KfQ==)"/>
|
||||
</category>
|
||||
|
||||
<!-- News -->
|
||||
<category label="60327">
|
||||
<setting label="60525" type="lsep"/>
|
||||
<setting id="news_films" type="action" label="60509" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoicGVsaWN1bGFzIg0KfQ==)"/>
|
||||
<setting id="news_series" type="action" label="60511" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoic2VyaWVzIg0KfQ==)"/>
|
||||
<setting id="news_anime" type="action" label="60512" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoiYW5pbWUiDQp9)"/>
|
||||
<setting id="news_documentaries" type="action" label="60513" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoiZG9jdW1lbnRhbGVzIg0KfQ==)"/>
|
||||
<setting id="news_options" type="action" label="60415" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5ncyIsDQogICAgImNoYW5uZWwiOiJuZXdzIg0KfQ==)"/>
|
||||
</category>
|
||||
|
||||
<!-- Customization -->
|
||||
<category label="70126">
|
||||
<!-- Homepage -->
|
||||
<setting label="70716" type="lsep"/>
|
||||
<setting id="enable_news_menu" label="30130" type="bool" default="true"/>
|
||||
<setting id="enable_channels_menu" label="30118" type="bool" default="true"/>
|
||||
<setting id="enable_search_menu" label="30103" type="bool" default="true"/>
|
||||
<setting id="enable_onair_menu" label="50001" type="bool" default="true"/>
|
||||
<setting id="enable_link_menu" label="70527" type="bool" default="true"/>
|
||||
<setting id="enable_fav_menu" label="30102" type="bool" default="true"/>
|
||||
<setting id="enable_library_menu" label="30131" type="bool" default="true"/>
|
||||
<!-- View Mode-->
|
||||
<setting label="70754" type="lsep"/>
|
||||
<setting id="skin_name" label='Skin Name' type="text" default="skin.estuary" visible="false"/>
|
||||
<setting id="view_mode_addon" type="action" label="70009" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6ImFkZG9uIg0KfQ==)" default= "Default, 0"/>
|
||||
<setting id="view_mode_channel" type="action" label="30118" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6ImNoYW5uZWwiDQp9)" default= "Default, 0"/>
|
||||
<setting id="view_mode_movie" type="action" label="30122" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6Im1vdmllIg0KfQ==)" default= "Default, 0"/>
|
||||
<setting id="view_mode_tvshow" type="action" label="30123" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6InR2c2hvdyINCn0=)" default= "Default, 0"/>
|
||||
<setting id="view_mode_season" type="action" label="30140" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6InNlYXNvbiINCn0=)" default= "Default, 0"/>
|
||||
<setting id="view_mode_episode" type="action" label="70362" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6ImVwaXNvZGUiDQp9)" default= "Default, 0"/>
|
||||
<setting id="view_mode_server" type="action" label="70145" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6InNlcnZlciINCn0=)" default= "Default, 0"/>
|
||||
<!-- Contextual -->
|
||||
<setting label="30024" type="lsep"/>
|
||||
<setting id="quick_menu" type="bool" label="60360" default="true"/>
|
||||
<setting id="side_menu" type="bool" label="70737" default="false"/>
|
||||
<setting id="kod_menu" type="bool" label="30025" default="true"/>
|
||||
<setting id="infoplus" type="bool" label="70151" default="false"/>
|
||||
<setting id="infoplus_set" type="bool" label="70128" visible="eq(-1,true)" default="false" subsetting="true"/>
|
||||
<setting id="extended_info" type="bool" label="70152" default="false"/>
|
||||
<!-- Shortcut -->
|
||||
<setting label="70153" type="lsep"/>
|
||||
<setting id="shortcut_key" type="action" label="30999" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAia2V5bWFwIg0KfQ==)"/>
|
||||
<setting id="delete_key" type="action" label="31000" action="RunPlugin(plugin://plugin.video.kod/?ewogICAgImFjdGlvbiI6ICJkZWxldGVfa2V5Igp9==)"/>
|
||||
<!-- Custom Start -->
|
||||
<setting label="70715" type="lsep"/>
|
||||
<setting id="start_page" type="bool" label="70121" default="false"/>
|
||||
<setting id="custom_start" type="bool" label="70122" default="false" visible="eq(-1,True)" enable="eq(-1,True)+eq(1,False)" subsetting="true"/>
|
||||
<setting id="news_start" type="bool" label="70123" default="false" visible="eq(-2,True)" enable="eq(-1,False)+eq(-2,True)" subsetting="true"/>
|
||||
<setting id="category" type="action" label="70124" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZWxlY3QiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkiaWQiOiJjYXRlZ29yeSIsDQoJInR5cGUiOiJsYWJlbHMiLA0KCSJ2YWx1ZXMiOiI3MDEzN3wzMDEyM3wzMDEyNHw2MDUxMyIsDQoJImxhYmVsIjoiNzAxMjQiDQp9)" visible="eq(-3,True)+eq(-1,True)+eq(-2,False)" enable="eq(-3,True)+eq(-1,True)+eq(-2,False)" subsetting="true"/>
|
||||
<!-- <setting id="category" type="select" label="70124" lvalues="70137|30123|30124|60513" default="Film" visible="eq(-3,True)+eq(-1,True)+eq(-2,False)" enable="eq(-3,True)+eq(-1,True)+(-2,false)"/> -->
|
||||
<!-- Others -->
|
||||
<setting label="70149" type="lsep"/>
|
||||
<setting id="icon_set" type="select" label="70108" values="default|light|dark|alfa|mike" default="default"/>
|
||||
<setting id="enable_custom_theme" type="bool" label="70564" default="false"/>
|
||||
<setting id="custom_theme" type="folder" label="70565" default="" visible="eq(-1,true)"/>
|
||||
<setting id="video_thumbnail_type" type="select" label="70131" lvalues="70132|70133" default="1"/>
|
||||
</category>
|
||||
|
||||
<!-- Adult -->
|
||||
|
||||
|
Before Width: | Height: | Size: 874 B |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 838 B |
|
Before Width: | Height: | Size: 167 B |
|
Before Width: | Height: | Size: 177 B |
44
resources/views/skin.ace2.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"all":{
|
||||
"Right List": 50,
|
||||
"Frame": 51,
|
||||
"Wall": 56,
|
||||
"Tech": 68,
|
||||
"Sets Plus": 74
|
||||
},
|
||||
"movie":{
|
||||
"Right List": 50,
|
||||
"Frame": 51,
|
||||
"Wall": 56,
|
||||
"Tech": 68,
|
||||
"Sets Plus": 74
|
||||
},
|
||||
"tvshow":{
|
||||
"Right List": 50,
|
||||
"Frame": 51,
|
||||
"Wall": 56,
|
||||
"Tech": 68,
|
||||
"Sets Plus": 74
|
||||
},
|
||||
"season":{
|
||||
"Right List": 50,
|
||||
"Frame": 51,
|
||||
"Wall": 56,
|
||||
"Tech": 68,
|
||||
"Sets Plus": 74
|
||||
},
|
||||
"episode":{
|
||||
"Right List": 50,
|
||||
"Frame": 51,
|
||||
"Wall": 56,
|
||||
"Tech": 68,
|
||||
"Sets Plus": 74
|
||||
},
|
||||
"addon":{
|
||||
"Right List": 50,
|
||||
"Frame": 51,
|
||||
"Wall": 56,
|
||||
"Tech": 68,
|
||||
"Sets Plus": 74
|
||||
}
|
||||
}
|
||||
109
resources/views/skin.aeon.nox.silvo.json
Normal file
@@ -0,0 +1,109 @@
|
||||
{
|
||||
"all":{
|
||||
"List": 50,
|
||||
"RightList": 506,
|
||||
"FanartList": 602,
|
||||
"LowList": 501,
|
||||
"BigList": 507,
|
||||
"Logo": 59,
|
||||
"Showcase": 53,
|
||||
"Shift": 57,
|
||||
"Posters": 56,
|
||||
"MyFlix": 509,
|
||||
"TriPanel": 55,
|
||||
"Icons": 500,
|
||||
"Small Icons": 499,
|
||||
"Wall": 503,
|
||||
"Fullscreen Wall": 609,
|
||||
"infoWall": 51,
|
||||
"BannerWall": 58,
|
||||
"BannerPlex": 601,
|
||||
"Landscape": 52,
|
||||
"BigFan": 591,
|
||||
"Gallery": 504,
|
||||
"Panel": 505,
|
||||
"Episode": 502
|
||||
},
|
||||
"movie":{
|
||||
"List": 50,
|
||||
"RightList": 506,
|
||||
"FanartList": 602,
|
||||
"LowList": 501,
|
||||
"BigList": 507,
|
||||
"Logo": 59,
|
||||
"Showcase": 53,
|
||||
"Shift": 57,
|
||||
"Posters": 56,
|
||||
"MyFlix": 509,
|
||||
"TriPanel": 55,
|
||||
"Icons": 500,
|
||||
"Small Icons": 499,
|
||||
"Wall": 503,
|
||||
"Fullscreen Wall": 609,
|
||||
"infoWall": 51,
|
||||
"BannerWall": 58,
|
||||
"BannerPlex": 601,
|
||||
"Landscape": 52,
|
||||
"BigFan": 591,
|
||||
"Gallery": 504,
|
||||
"Panel": 505
|
||||
},
|
||||
"tvshow":{
|
||||
"List": 50,
|
||||
"RightList": 506,
|
||||
"FanartList": 602,
|
||||
"LowList": 501,
|
||||
"BigList": 507,
|
||||
"Logo": 59,
|
||||
"Showcase": 53,
|
||||
"Shift": 57,
|
||||
"Posters": 56,
|
||||
"MyFlix": 509,
|
||||
"TriPanel": 55,
|
||||
"Icons": 500,
|
||||
"Small Icons": 499,
|
||||
"Wall": 503,
|
||||
"Fullscreen Wall": 609,
|
||||
"infoWall": 51,
|
||||
"BannerWall": 58,
|
||||
"BannerPlex": 601,
|
||||
"Landscape": 52,
|
||||
"BigFan": 591,
|
||||
"Gallery": 504,
|
||||
"Panel": 505,
|
||||
"Episode": 502
|
||||
},
|
||||
"season":{
|
||||
"List": 50,
|
||||
"RightList": 506,
|
||||
"FanartList": 602,
|
||||
"LowList": 501,
|
||||
"Showcase": 53,
|
||||
"Shift": 57,
|
||||
"Posters": 56,
|
||||
"TriPanel": 55,
|
||||
"Icons": 500,
|
||||
"Small Icons": 499,
|
||||
"Wall": 503,
|
||||
"BigFan": 591
|
||||
},
|
||||
"episode":{
|
||||
"List": 50,
|
||||
"RightList": 506,
|
||||
"FanartList": 602,
|
||||
"LowList": 501,
|
||||
"BigList": 507,
|
||||
"Episode": 502,
|
||||
"MyFlix": 509,
|
||||
"TriPanel": 55,
|
||||
"Icons": 500,
|
||||
"Landscape": 52,
|
||||
"Panel": 505
|
||||
},
|
||||
"addon":{
|
||||
"List": 50,
|
||||
"Shift": 57,
|
||||
"Icons": 500,
|
||||
"Wall": 503
|
||||
}
|
||||
}
|
||||
50
resources/views/skin.aeon.tajo.json
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"all":{
|
||||
"List": 50,
|
||||
"MultiSort": 589,
|
||||
"MultiWall": 587,
|
||||
"Shelf 3D": 595,
|
||||
"List 3D": 596,
|
||||
"Fanart 3D": 593,
|
||||
"Triple 3D": 590,
|
||||
"Wall 3D": 586,
|
||||
"Banner 3D": 594,
|
||||
"MultiWall 3D": 587
|
||||
},
|
||||
"movie":{
|
||||
"List": 50,
|
||||
"MultiSort": 589,
|
||||
"MultiWall": 587,
|
||||
"Shelf 3D": 595,
|
||||
"List 3D": 596,
|
||||
"Fanart 3D": 593,
|
||||
"Triple 3D": 590,
|
||||
"Wall 3D": 586,
|
||||
"Banner 3D": 594,
|
||||
"MultiWall 3D": 587
|
||||
},
|
||||
"tvshow":{
|
||||
"List": 50,
|
||||
"MultiWall": 587,
|
||||
"Shelf 3D": 595,
|
||||
"List 3D": 596,
|
||||
"Fanart 3D": 593,
|
||||
"Triple 3D": 590,
|
||||
"Wall 3D": 586,
|
||||
"Banner 3D": 594,
|
||||
"MultiWall 3D": 587
|
||||
},
|
||||
"season":{
|
||||
"List": 50,
|
||||
"Shelf 3D": 595,
|
||||
"List 3D": 596,
|
||||
"Wall 3D": 586
|
||||
},
|
||||
"episode":{
|
||||
"List": 50,
|
||||
"List 3D": 596
|
||||
},
|
||||
"addon":{
|
||||
"List": 50
|
||||
}
|
||||
}
|
||||
96
resources/views/skin.aeonmq8.json
Normal file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"all":{
|
||||
"Right List": 51,
|
||||
"Banner": 52,
|
||||
"Banner Info": 53,
|
||||
"Poster": 54,
|
||||
"Low List": 55,
|
||||
"Wall": 56,
|
||||
"Glass List": 57,
|
||||
"Coverflow": 58,
|
||||
"Wide": 59,
|
||||
"Showart": 60,
|
||||
"Multiplex": 61,
|
||||
"Panel": 62,
|
||||
"Shelf": 63,
|
||||
"Sets": 65,
|
||||
"Showcase": 66,
|
||||
"Wall 3D": 67,
|
||||
"Posterlite": 80,
|
||||
"Poster List": 70,
|
||||
"Total Art": 71
|
||||
},
|
||||
"movie":{
|
||||
"Right List": 51,
|
||||
"Banner": 52,
|
||||
"Banner Info": 53,
|
||||
"Poster": 54,
|
||||
"Low List": 55,
|
||||
"Wall": 56,
|
||||
"Glass List": 57,
|
||||
"Coverflow": 58,
|
||||
"Wide": 59,
|
||||
"Showart": 60,
|
||||
"Multiplex": 61,
|
||||
"Panel": 62,
|
||||
"Shelf": 63,
|
||||
"Sets": 65,
|
||||
"Showcase": 66,
|
||||
"Wall 3D": 67,
|
||||
"Posterlite": 80,
|
||||
"Poster List": 70,
|
||||
"Total Art": 71
|
||||
},
|
||||
"tvshow":{
|
||||
"Right List": 51,
|
||||
"Banner": 52,
|
||||
"Banner Info": 53,
|
||||
"Poster": 54,
|
||||
"Low List": 55,
|
||||
"Wall": 56,
|
||||
"Glass List": 57,
|
||||
"Coverflow": 58,
|
||||
"Wide": 59,
|
||||
"Showart": 60,
|
||||
"Multiplex": 61,
|
||||
"Panel": 62,
|
||||
"Shelf": 63,
|
||||
"Showcase": 66,
|
||||
"Wall 3D": 67,
|
||||
"Posterlite": 80
|
||||
},
|
||||
"season":{
|
||||
"Right List": 51,
|
||||
"Banner": 52,
|
||||
"Banner Info": 53,
|
||||
"Poster": 54,
|
||||
"Low List": 55,
|
||||
"Wall": 56,
|
||||
"Glass List": 57,
|
||||
"Coverflow": 58,
|
||||
"Wide": 59,
|
||||
"Showart": 60,
|
||||
"Multiplex": 61,
|
||||
"Panel": 62,
|
||||
"Shelf": 63,
|
||||
"Showcase": 66,
|
||||
"Wall 3D": 67,
|
||||
"Posterlite": 80
|
||||
},
|
||||
"episode":{
|
||||
"Right List": 51,
|
||||
"Poster": 54,
|
||||
"Low List": 55,
|
||||
"Wall": 56,
|
||||
"Glass List": 57,
|
||||
"Wide": 59,
|
||||
"Showart": 60,
|
||||
"Multiplex": 61,
|
||||
"Panel": 62,
|
||||
"Wall 3D": 67,
|
||||
"Posterlite": 80
|
||||
},
|
||||
"addon":{
|
||||
"Right List": 51
|
||||
}
|
||||
}
|
||||
62
resources/views/skin.amber.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"all":{
|
||||
"List": 50,
|
||||
"Low List": 54,
|
||||
"Big List": 52,
|
||||
"Tall List": 501,
|
||||
"Panel": 51,
|
||||
"Big Panel": 55,
|
||||
"Icons": 53,
|
||||
"Fanart": 56
|
||||
},
|
||||
"movie":{
|
||||
"List": 50,
|
||||
"Low List": 54,
|
||||
"Big List": 52,
|
||||
"Tall List": 501,
|
||||
"Panel": 51,
|
||||
"Big Panel": 55,
|
||||
"Icons": 53,
|
||||
"Fanart": 56
|
||||
},
|
||||
"tvshow":{
|
||||
"List": 50,
|
||||
"Low List": 54,
|
||||
"Big List": 52,
|
||||
"Tall List": 501,
|
||||
"Panel": 51,
|
||||
"Big Panel": 55,
|
||||
"Icons": 53,
|
||||
"Fanart": 56
|
||||
},
|
||||
"season":{
|
||||
"List": 50,
|
||||
"Low List": 54,
|
||||
"Big List": 52,
|
||||
"Tall List": 501,
|
||||
"Panel": 51,
|
||||
"Big Panel": 55,
|
||||
"Icons": 53,
|
||||
"Fanart": 56
|
||||
},
|
||||
"episode":{
|
||||
"List": 50,
|
||||
"Low List": 54,
|
||||
"Big List": 52,
|
||||
"Tall List": 501,
|
||||
"Panel": 51,
|
||||
"Big Panel": 55,
|
||||
"Icons": 53,
|
||||
"Fanart": 56
|
||||
},
|
||||
"addon":{
|
||||
"List": 50,
|
||||
"Low List": 54,
|
||||
"Big List": 52,
|
||||
"Tall List": 501,
|
||||
"Panel": 51,
|
||||
"Big Panel": 55,
|
||||
"Icons": 53,
|
||||
"Fanart": 56
|
||||
}
|
||||
}
|
||||
45
resources/views/skin.apptv.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"all":{
|
||||
"List": 50,
|
||||
"Icons": 52,
|
||||
"Banner": 53,
|
||||
"Wrap": 54,
|
||||
"Coverflow": 57,
|
||||
"Wall": 58
|
||||
},
|
||||
"movie":{
|
||||
"List": 50,
|
||||
"Icons": 52,
|
||||
"Wrap": 54,
|
||||
"Coverflow": 57,
|
||||
"Wall": 58
|
||||
},
|
||||
"tvshow":{
|
||||
"List": 50,
|
||||
"Icons": 52,
|
||||
"Banner": 53,
|
||||
"Wrap": 54,
|
||||
"Coverflow": 57,
|
||||
"Wall": 58
|
||||
},
|
||||
"season":{
|
||||
"List": 50,
|
||||
"Icons": 52,
|
||||
"Wrap": 54,
|
||||
"Coverflow": 57,
|
||||
"Wall": 58
|
||||
},
|
||||
"episode":{
|
||||
"List": 50,
|
||||
"Icons": 52,
|
||||
"Wrap": 54,
|
||||
"Coverflow": 57
|
||||
},
|
||||
"addon":{
|
||||
"List": 50,
|
||||
"Icons": 52,
|
||||
"Wrap": 54,
|
||||
"Coverflow": 57,
|
||||
"Wall": 58
|
||||
}
|
||||
}
|
||||
81
resources/views/skin.arctic.zephyr.2.json
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"all":{
|
||||
"List": 50,
|
||||
"MediaInfo": 501,
|
||||
"MediaInfo 2": 502,
|
||||
"Tri-Panel": 504,
|
||||
"Banner List": 503,
|
||||
"Poster Wall": 51,
|
||||
"Landscape Wall": 511,
|
||||
"Info Wall": 514,
|
||||
"Info Wall 2": 516,
|
||||
"Landscape Wall Small": 515,
|
||||
"Poster Showcase": 52,
|
||||
"Landscape Showcase": 521,
|
||||
"Poster": 53,
|
||||
"Lovefilm": 523,
|
||||
"Seasons Info": 522,
|
||||
"Seasons Info 2": 524,
|
||||
"Square Wall": 510,
|
||||
"Icon Wall": 512
|
||||
},
|
||||
"movie":{
|
||||
"List": 50,
|
||||
"MediaInfo": 501,
|
||||
"MediaInfo 2": 502,
|
||||
"Tri-Panel": 504,
|
||||
"Banner List": 503,
|
||||
"Poster Wall": 51,
|
||||
"Landscape Wall": 511,
|
||||
"Info Wall": 514,
|
||||
"Info Wall 2": 516,
|
||||
"Landscape Wall Small": 515,
|
||||
"Poster Showcase": 52,
|
||||
"Landscape Showcase": 521,
|
||||
"Poster": 53,
|
||||
"Lovefilm": 523
|
||||
},
|
||||
"tvshow":{
|
||||
"List": 50,
|
||||
"MediaInfo": 501,
|
||||
"MediaInfo 2": 502,
|
||||
"Tri-Panel": 504,
|
||||
"Banner List": 503,
|
||||
"Poster Wall": 51,
|
||||
"Landscape Wall": 511,
|
||||
"Info Wall": 514,
|
||||
"Info Wall 2": 516,
|
||||
"Landscape Wall Small": 515,
|
||||
"Poster Showcase": 52,
|
||||
"Landscape Showcase": 521,
|
||||
"Poster": 53,
|
||||
"Lovefilm": 523
|
||||
},
|
||||
"season":{
|
||||
"List": 50,
|
||||
"Banner List": 503,
|
||||
"Poster Wall": 51,
|
||||
"Info Wall": 514,
|
||||
"Info Wall 2": 516,
|
||||
"Poster Showcase": 52,
|
||||
"Seasons Info": 522,
|
||||
"Seasons Info 2": 524,
|
||||
"Poster": 53
|
||||
},
|
||||
"episode":{
|
||||
"List": 50,
|
||||
"MediaInfo": 501,
|
||||
"MediaInfo 2": 502,
|
||||
"Tri-Panel": 504,
|
||||
"Banner List": 503,
|
||||
"Landscape Wall": 511,
|
||||
"Info Wall 2": 516,
|
||||
"Landscape Wall Small": 515,
|
||||
"Landscape Showcase": 521
|
||||
},
|
||||
"addon":{
|
||||
"List": 50,
|
||||
"Square Wall": 510,
|
||||
"Icon Wall": 512
|
||||
}
|
||||
}
|
||||
78
resources/views/skin.aura.json
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"all":{
|
||||
"List": 50,
|
||||
"Poster Wall": 51,
|
||||
"Landscape Wall": 52,
|
||||
"Square Wall": 53,
|
||||
"Banner Wall": 54,
|
||||
"Showcase": 55,
|
||||
"Landscape Showcase": 56,
|
||||
"Square Showcase": 57,
|
||||
"Big Posters": 58,
|
||||
"Lovefilm": 59,
|
||||
"Media Info": 500,
|
||||
"info List": 501,
|
||||
"Episode List": 502,
|
||||
"Square Wall Large": 503
|
||||
},
|
||||
"movie":{
|
||||
"List": 50,
|
||||
"Poster Wall": 51,
|
||||
"Landscape Wall": 52,
|
||||
"Showcase": 55,
|
||||
"Landscape Showcase": 56,
|
||||
"Square Showcase": 57,
|
||||
"Big Posters": 58,
|
||||
"Lovefilm": 59,
|
||||
"Media Info": 500,
|
||||
"info List": 501,
|
||||
"Episode List": 502
|
||||
},
|
||||
"tvshow":{
|
||||
"List": 50,
|
||||
"Poster Wall": 51,
|
||||
"Landscape Wall": 52,
|
||||
"Banner Wall": 54,
|
||||
"Showcase": 55,
|
||||
"Landscape Showcase": 56,
|
||||
"Square Showcase": 57,
|
||||
"Big Posters": 58,
|
||||
"Lovefilm": 59,
|
||||
"Media Info": 500,
|
||||
"info List": 501,
|
||||
"Episode List": 502
|
||||
},
|
||||
"season":{
|
||||
"List": 50,
|
||||
"Poster Wall": 51,
|
||||
"Landscape Wall": 52,
|
||||
"Banner Wall": 54,
|
||||
"Showcase": 55,
|
||||
"Landscape Showcase": 56,
|
||||
"Square Showcase": 57,
|
||||
"Big Posters": 58,
|
||||
"Lovefilm": 59,
|
||||
"Media Info": 500,
|
||||
"info List": 501,
|
||||
"Episode List": 502
|
||||
},
|
||||
"episode":{
|
||||
"List": 50,
|
||||
"Poster Wall": 51,
|
||||
"Landscape Wall": 52,
|
||||
"Banner Wall": 54,
|
||||
"Showcase": 55,
|
||||
"Landscape Showcase": 56,
|
||||
"Square Showcase": 57,
|
||||
"Big Posters": 58,
|
||||
"Lovefilm": 59,
|
||||
"Media Info": 500,
|
||||
"info List": 501,
|
||||
"Episode List": 502
|
||||
},
|
||||
"addon":{
|
||||
"List": 50,
|
||||
"Square Wall": 53,
|
||||
"Square Wall Large": 503
|
||||
}
|
||||
}
|
||||
76
resources/views/skin.bello.7.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"all":{
|
||||
"List": 50,
|
||||
"Bello": 66,
|
||||
"Slide": 51,
|
||||
"Gallery": 52,
|
||||
"Tiles": 562,
|
||||
"Thumbnails": 560,
|
||||
"Posters": 561,
|
||||
"Posters 2": 64,
|
||||
"Banner List": 57,
|
||||
"3D Wall": 53,
|
||||
"Wall": 54,
|
||||
"List Wall": 58,
|
||||
"VideoWall": 580,
|
||||
"Showtime": 65,
|
||||
"Netflix": 59
|
||||
},
|
||||
"movie":{
|
||||
"List": 50,
|
||||
"Bello": 66,
|
||||
"Slide": 51,
|
||||
"Gallery": 52,
|
||||
"Tiles": 562,
|
||||
"Thumbnails": 560,
|
||||
"Posters": 561,
|
||||
"Posters 2": 64,
|
||||
"Banner List": 57,
|
||||
"3D Wall": 53,
|
||||
"Wall": 54,
|
||||
"List Wall": 58,
|
||||
"VideoWall": 580,
|
||||
"Showtime": 65,
|
||||
"Netflix": 59
|
||||
},
|
||||
"tvshow":{
|
||||
"List": 50,
|
||||
"Bello": 66,
|
||||
"Slide": 51,
|
||||
"Gallery": 52,
|
||||
"Tiles": 562,
|
||||
"Thumbnails": 560,
|
||||
"Posters 2": 64,
|
||||
"Banner List": 57,
|
||||
"3D Wall": 53,
|
||||
"Wall": 54,
|
||||
"List Wall": 58,
|
||||
"VideoWall": 580,
|
||||
"Showtime": 65,
|
||||
"Netflix": 59
|
||||
},
|
||||
"season":{
|
||||
"List": 50,
|
||||
"Bello": 66,
|
||||
"Slide": 51,
|
||||
"Gallery": 52,
|
||||
"Tiles": 562,
|
||||
"Thumbnails": 560,
|
||||
"Banner List": 57,
|
||||
"Netflix": 59
|
||||
},
|
||||
"episode":{
|
||||
"List": 50,
|
||||
"Bello": 66,
|
||||
"Gallery": 52,
|
||||
"Tiles": 562,
|
||||
"Thumbnails": 560,
|
||||
"Banner List": 57,
|
||||
"Netflix": 59
|
||||
},
|
||||
"addon":{
|
||||
"List": 50,
|
||||
"Bello": 66,
|
||||
"Thumbnails": 560
|
||||
}
|
||||
}
|
||||
67
resources/views/skin.blackglassnova.json
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"all":{
|
||||
"List": 50,
|
||||
"Large List": 52,
|
||||
"Low List": 54,
|
||||
"Banner List": 56,
|
||||
"Panel": 51,
|
||||
"Big Panel": 55,
|
||||
"Icons": 53,
|
||||
"Poster Showcase": 59,
|
||||
"Card List": 5050
|
||||
},
|
||||
"movie":{
|
||||
"List": 50,
|
||||
"Large List": 52,
|
||||
"Low List": 54,
|
||||
"Banner List": 56,
|
||||
"Panel": 51,
|
||||
"Big Panel": 55,
|
||||
"Icons": 53,
|
||||
"Poster Showcase": 59,
|
||||
"Card List": 5050
|
||||
},
|
||||
"tvshow":{
|
||||
"List": 50,
|
||||
"Large List": 52,
|
||||
"Low List": 54,
|
||||
"Banner List": 56,
|
||||
"Panel": 51,
|
||||
"Big Panel": 55,
|
||||
"Icons": 53,
|
||||
"Poster Showcase": 59,
|
||||
"Card List": 5050
|
||||
},
|
||||
"season":{
|
||||
"List": 50,
|
||||
"Large List": 52,
|
||||
"Low List": 54,
|
||||
"Banner List": 56,
|
||||
"Panel": 51,
|
||||
"Big Panel": 55,
|
||||
"Icons": 53,
|
||||
"Poster Showcase": 59,
|
||||
"Card List": 5050
|
||||
},
|
||||
"episode":{
|
||||
"List": 50,
|
||||
"Large List": 52,
|
||||
"Low List": 54,
|
||||
"Banner List": 56,
|
||||
"Panel": 51,
|
||||
"Big Panel": 55,
|
||||
"Icons": 53,
|
||||
"Poster Showcase": 59,
|
||||
"Card List": 5050
|
||||
},
|
||||
"addon":{
|
||||
"List": 50,
|
||||
"Large List": 52,
|
||||
"Low List": 54,
|
||||
"Panel": 51,
|
||||
"Big Panel": 55,
|
||||
"Icons": 53,
|
||||
"Fanart": 58,
|
||||
"Card List": 5050
|
||||
}
|
||||
}
|
||||
46
resources/views/skin.box.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"all":{
|
||||
"List": 50,
|
||||
"Thumbs": 52,
|
||||
"Fanart": 527,
|
||||
"Poster": 532,
|
||||
"Banner": 50,
|
||||
"Banner List": 536,
|
||||
"Fanart Logo": 539,
|
||||
"List Info": 5231,
|
||||
"Thumb Info": 533
|
||||
},
|
||||
"movie":{
|
||||
"List": 50,
|
||||
"Thumbs": 52,
|
||||
"Fanart": 527,
|
||||
"Poster": 532,
|
||||
"Fanart Logo": 539,
|
||||
"List Info": 5231,
|
||||
"Thumb Info": 533
|
||||
},
|
||||
"tvshow":{
|
||||
"List": 50,
|
||||
"Thumbs": 52,
|
||||
"Fanart": 527,
|
||||
"Poster": 532,
|
||||
"Banner": 50,
|
||||
"Banner List": 536,
|
||||
"Fanart Logo": 539,
|
||||
"List Info": 5231,
|
||||
"Thumb Info": 533
|
||||
},
|
||||
"season":{
|
||||
"List": 50,
|
||||
"Poster": 532
|
||||
},
|
||||
"episode":{
|
||||
"List": 50,
|
||||
"Thumbs": 52,
|
||||
"List Info": 5231,
|
||||
"Thumb Info": 533
|
||||
},
|
||||
"addon":{
|
||||
"List": 50
|
||||
}
|
||||
}
|
||||
55
resources/views/skin.confluence.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"all":{
|
||||
"List": 50,
|
||||
"Big List": 55,
|
||||
"Thumbnail": 500,
|
||||
"Poster Wrap": 501,
|
||||
"Fanart": 508,
|
||||
"Media Info": 503,
|
||||
"Media Info 2": 504,
|
||||
"Media Info 3": 504,
|
||||
"Wide": 505
|
||||
},
|
||||
"movie":{
|
||||
"List": 50,
|
||||
"Big List": 55,
|
||||
"Thumbnail": 500,
|
||||
"Poster Wrap": 501,
|
||||
"Fanart": 508,
|
||||
"Media Info": 503,
|
||||
"Media Info 2": 504,
|
||||
"Media Info 3": 504
|
||||
},
|
||||
"tvshow":{
|
||||
"List": 50,
|
||||
"Big List": 55,
|
||||
"Thumbnail": 500,
|
||||
"Poster Wrap": 501,
|
||||
"Fanart": 508,
|
||||
"Media Info": 503,
|
||||
"Media Info 2": 504,
|
||||
"Media Info 3": 504,
|
||||
"Wide": 505
|
||||
},
|
||||
"season":{
|
||||
"List": 50,
|
||||
"Big List": 55,
|
||||
"Thumbnail": 500,
|
||||
"Poster Wrap": 501,
|
||||
"Media Info 2": 504,
|
||||
"Media Info 3": 504
|
||||
},
|
||||
"episode":{
|
||||
"List": 50,
|
||||
"Big List": 55,
|
||||
"Thumbnail": 500,
|
||||
"Media Info": 503,
|
||||
"Media Info 2": 504,
|
||||
"Media Info 3": 504
|
||||
},
|
||||
"addon":{
|
||||
"List": 50,
|
||||
"Big List": 55,
|
||||
"Thumbnail": 500
|
||||
}
|
||||
}
|
||||
92
resources/views/skin.eminence.2.json
Normal file
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"all":{
|
||||
"Plain List": 552,
|
||||
"Poster List": 550,
|
||||
"Big List": 510,
|
||||
"Media Info": 51,
|
||||
"Media Info 2": 57,
|
||||
"Media Info 3": 577,
|
||||
"Info List": 53,
|
||||
"Info List 2": 553,
|
||||
"Fanart List": 54,
|
||||
"Gallery": 58,
|
||||
"Big Icons": 52,
|
||||
"Mediun Icons": 525,
|
||||
"Showcase": 535,
|
||||
"Icons": 500,
|
||||
"Info Icons": 59,
|
||||
"Wide": 55,
|
||||
"Fanart": 56
|
||||
},
|
||||
"movie":{
|
||||
"Plain List": 552,
|
||||
"Poster List": 550,
|
||||
"Big List": 510,
|
||||
"Media Info": 51,
|
||||
"Media Info 2": 57,
|
||||
"Media Info 3": 577,
|
||||
"Info List": 53,
|
||||
"Info List 2": 553,
|
||||
"Fanart List": 54,
|
||||
"Gallery": 58,
|
||||
"Big Icons": 52,
|
||||
"Mediun Icons": 525,
|
||||
"Showcase": 535,
|
||||
"Icons": 500,
|
||||
"Info Icons": 59,
|
||||
"Wide": 55,
|
||||
"Fanart": 56
|
||||
},
|
||||
"tvshow":{
|
||||
"Plain List": 552,
|
||||
"Poster List": 550,
|
||||
"Big List": 510,
|
||||
"Media Info": 51,
|
||||
"Media Info 2": 57,
|
||||
"Media Info 3": 577,
|
||||
"Info List": 53,
|
||||
"Info List 2": 553,
|
||||
"Fanart List": 54,
|
||||
"Gallery": 58,
|
||||
"Big Icons": 52,
|
||||
"Mediun Icons": 525,
|
||||
"Showcase": 535,
|
||||
"Icons": 500,
|
||||
"Info Icons": 59,
|
||||
"Wide": 55,
|
||||
"Fanart": 56
|
||||
},
|
||||
"season":{
|
||||
"Plain List": 552,
|
||||
"Poster List": 550,
|
||||
"Media Info": 51,
|
||||
"Media Info 2": 57,
|
||||
"Info List": 53,
|
||||
"Fanart List": 54,
|
||||
"Gallery": 58,
|
||||
"Big Icons": 52,
|
||||
"Mediun Icons": 525,
|
||||
"Showcase": 535,
|
||||
"Icons": 500,
|
||||
"Info Icons": 59
|
||||
},
|
||||
"episode":{
|
||||
"Plain List": 552,
|
||||
"Poster List": 550,
|
||||
"Media Info": 51,
|
||||
"Media Info 2": 57,
|
||||
"Info List": 53,
|
||||
"Info List 2": 553,
|
||||
"Fanart List": 54,
|
||||
"Gallery": 58,
|
||||
"Icons": 500,
|
||||
"Fanart": 56
|
||||
},
|
||||
"addon":{
|
||||
"Plain List": 552,
|
||||
"Poster List": 550,
|
||||
"Big List": 510,
|
||||
"Icons": 500,
|
||||
"Info Icons": 59
|
||||
}
|
||||
}
|
||||
54
resources/views/skin.estuary.json
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"all":{
|
||||
"List": 50,
|
||||
"Poster": 51,
|
||||
"Shift": 53,
|
||||
"InfoWall": 54,
|
||||
"WideList": 55,
|
||||
"Wall": 500,
|
||||
"Banner": 501,
|
||||
"Fanart": 502
|
||||
},
|
||||
"movie":{
|
||||
"List": 50,
|
||||
"Poster": 51,
|
||||
"Shift": 53,
|
||||
"InfoWall": 54,
|
||||
"WideList": 55,
|
||||
"Wall": 500,
|
||||
"Fanart": 502
|
||||
},
|
||||
"tvshow":{
|
||||
"List": 50,
|
||||
"Poster": 51,
|
||||
"Shift": 53,
|
||||
"InfoWall": 54,
|
||||
"WideList": 55,
|
||||
"Wall": 500,
|
||||
"Banner": 501,
|
||||
"Fanart": 502
|
||||
},
|
||||
"season":{
|
||||
"List": 50,
|
||||
"Poster": 51,
|
||||
"Shift": 53,
|
||||
"InfoWall": 54,
|
||||
"WideList": 55,
|
||||
"Wall": 500,
|
||||
"Fanart": 502
|
||||
},
|
||||
"episode":{
|
||||
"List": 50,
|
||||
"Poster": 51,
|
||||
"Shift": 53,
|
||||
"InfoWall": 54,
|
||||
"WideList": 55,
|
||||
"Wall": 500,
|
||||
"Banner": 501,
|
||||
"Fanart": 502
|
||||
},
|
||||
"addon":{
|
||||
"WideList": 55,
|
||||
"Wall": 500
|
||||
}
|
||||
}
|
||||
62
resources/views/skin.phenomenal.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"all":{
|
||||
"Fanart": 50,
|
||||
"Poster": 51,
|
||||
"Thumb": 52,
|
||||
"Showcase": 53,
|
||||
"Wide List": 54,
|
||||
"Icons": 55,
|
||||
"Pictures": 56,
|
||||
"Banner List": 57
|
||||
},
|
||||
"movie":{
|
||||
"Fanart": 50,
|
||||
"Poster": 51,
|
||||
"Thumb": 52,
|
||||
"Showcase": 53,
|
||||
"Wide List": 54,
|
||||
"Icons": 55,
|
||||
"Pictures": 56,
|
||||
"Banner List": 57
|
||||
},
|
||||
"tvshow":{
|
||||
"Fanart": 50,
|
||||
"Poster": 51,
|
||||
"Thumb": 52,
|
||||
"Showcase": 53,
|
||||
"Wide List": 54,
|
||||
"Icons": 55,
|
||||
"Pictures": 56,
|
||||
"Banner List": 57
|
||||
},
|
||||
"season":{
|
||||
"Fanart": 50,
|
||||
"Poster": 51,
|
||||
"Thumb": 52,
|
||||
"Showcase": 53,
|
||||
"Wide List": 54,
|
||||
"Icons": 55,
|
||||
"Pictures": 56,
|
||||
"Banner List": 57
|
||||
},
|
||||
"episode":{
|
||||
"Fanart": 50,
|
||||
"Poster": 51,
|
||||
"Thumb": 52,
|
||||
"Showcase": 53,
|
||||
"Wide List": 54,
|
||||
"Icons": 55,
|
||||
"Pictures": 56,
|
||||
"Banner List": 57
|
||||
},
|
||||
"addon":{
|
||||
"Fanart": 50,
|
||||
"Poster": 51,
|
||||
"Thumb": 52,
|
||||
"Showcase": 53,
|
||||
"Wide List": 54,
|
||||
"Icons": 55,
|
||||
"Pictures": 56,
|
||||
"Banner List": 57
|
||||
}
|
||||
}
|
||||
66
resources/views/skin.quartz.json
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"all":{
|
||||
"List": 50,
|
||||
"Big List": 51,
|
||||
"Media Info": 52,
|
||||
"Media Info 2": 54,
|
||||
"Icons": 53,
|
||||
"Big Icons": 501,
|
||||
"Panel": 501,
|
||||
"Wide": 55,
|
||||
"Fanart 1": 57,
|
||||
"Fanart 2": 59,
|
||||
"Fanart 3": 500
|
||||
},
|
||||
"movie":{
|
||||
"List": 50,
|
||||
"Big List": 51,
|
||||
"Media Info": 52,
|
||||
"Media Info 2": 54,
|
||||
"Icons": 53,
|
||||
"Big Icons": 501,
|
||||
"Panel": 501,
|
||||
"Fanart 1": 57,
|
||||
"Fanart 2": 59,
|
||||
"Fanart 3": 500
|
||||
},
|
||||
"tvshow":{
|
||||
"List": 50,
|
||||
"Big List": 51,
|
||||
"Media Info": 52,
|
||||
"Media Info 2": 54,
|
||||
"Icons": 53,
|
||||
"Big Icons": 501,
|
||||
"Panel": 501,
|
||||
"Wide": 55,
|
||||
"Fanart 1": 57,
|
||||
"Fanart 2": 59,
|
||||
"Fanart 3": 500
|
||||
},
|
||||
"season":{
|
||||
"List": 50,
|
||||
"Big List": 51,
|
||||
"Media Info": 52,
|
||||
"Media Info 2": 54,
|
||||
"Icons": 53,
|
||||
"Big Icons": 501,
|
||||
"Panel": 501,
|
||||
"Fanart 1": 57,
|
||||
"Fanart 2": 59,
|
||||
"Fanart 3": 500
|
||||
},
|
||||
"episode":{
|
||||
"List": 50,
|
||||
"Big List": 51,
|
||||
"Media Info": 52,
|
||||
"Media Info 2": 54,
|
||||
"Icons": 53,
|
||||
"Panel": 501,
|
||||
"Fanart 3": 500
|
||||
},
|
||||
"addon":{
|
||||
"List": 50,
|
||||
"Big List": 51,
|
||||
"Icons": 53
|
||||
}
|
||||
}
|
||||
51
resources/views/skin.rapier.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"all":{
|
||||
|
||||
},
|
||||
"movie":{
|
||||
"Icon": 50,
|
||||
"List": 52,
|
||||
"List Info": 58,
|
||||
"List Info 2": 66,
|
||||
"List Info 3": 95,
|
||||
"Thumbs Info": 97,
|
||||
"Wrap Info": 53,
|
||||
"3D Wrap": 588,
|
||||
"Fanart": 583,
|
||||
"Wall": 69
|
||||
},
|
||||
"tvshow":{
|
||||
"Icon": 50,
|
||||
"List": 52,
|
||||
"List Info": 61,
|
||||
"List Info 2": 65,
|
||||
"List Info 3": 589,
|
||||
"Thumbs Info": 100,
|
||||
"Wrap Info": 577,
|
||||
"3D Wrap": 588,
|
||||
"Fanart": 583,
|
||||
"Wall": 586
|
||||
},
|
||||
"season":{
|
||||
"Icon": 50,
|
||||
"List": 52,
|
||||
"List Info": 61,
|
||||
"List Info 2": 65,
|
||||
"List Info 3": 589,
|
||||
"Wall": 586,
|
||||
"Extended": 585
|
||||
},
|
||||
"episode":{
|
||||
"Icon": 50,
|
||||
"List": 52,
|
||||
"List Info": 73,
|
||||
"List Info 2": 68,
|
||||
"List Info 3": 94
|
||||
},
|
||||
"addon":{
|
||||
"Icon": 50,
|
||||
"List": 52,
|
||||
"List Info": 91,
|
||||
"Wrap Info": 93
|
||||
}
|
||||
}
|
||||
68
resources/views/skin.revolve.json
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"all":{
|
||||
"Circle List": 52,
|
||||
"Thumbnails List": 55,
|
||||
"Drop List": 51,
|
||||
"Landscape List": 53,
|
||||
"Revolve List": 54,
|
||||
"Panels List": 56,
|
||||
"Gallery List": 57,
|
||||
"Rotate List": 58,
|
||||
"Banners List": 59
|
||||
},
|
||||
"movie":{
|
||||
"Circle List": 52,
|
||||
"Thumbnails List": 55,
|
||||
"Drop List": 51,
|
||||
"Landscape List": 53,
|
||||
"Revolve List": 54,
|
||||
"Panels List": 56,
|
||||
"Gallery List": 57,
|
||||
"Rotate List": 58,
|
||||
"Banners List": 59
|
||||
},
|
||||
"tvshow":{
|
||||
"Circle List": 52,
|
||||
"Thumbnails List": 55,
|
||||
"Drop List": 51,
|
||||
"Landscape List": 53,
|
||||
"Revolve List": 54,
|
||||
"Panels List": 56,
|
||||
"Gallery List": 57,
|
||||
"Rotate List": 58,
|
||||
"Banners List": 59
|
||||
},
|
||||
"season":{
|
||||
"Circle List": 52,
|
||||
"Thumbnails List": 55,
|
||||
"Drop List": 51,
|
||||
"Landscape List": 53,
|
||||
"Revolve List": 54,
|
||||
"Panels List": 56,
|
||||
"Gallery List": 57,
|
||||
"Rotate List": 58,
|
||||
"Banners List": 59
|
||||
},
|
||||
"episode":{
|
||||
"Circle List": 52,
|
||||
"Thumbnails List": 55,
|
||||
"Drop List": 51,
|
||||
"Landscape List": 53,
|
||||
"Revolve List": 54,
|
||||
"Panels List": 56,
|
||||
"Gallery List": 57,
|
||||
"Rotate List": 58,
|
||||
"Banners List": 59
|
||||
},
|
||||
"addon":{
|
||||
"Circle List": 52,
|
||||
"Thumbnails List": 55,
|
||||
"Drop List": 51,
|
||||
"Landscape List": 53,
|
||||
"Revolve List": 54,
|
||||
"Panels List": 56,
|
||||
"Gallery List": 57,
|
||||
"Rotate List": 58,
|
||||
"Banners List": 59
|
||||
}
|
||||
}
|
||||
61
resources/views/skin.unity.json
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"all":{
|
||||
"List": 50,
|
||||
"Big List": 51,
|
||||
"Thumbnail": 500,
|
||||
"Poster Wrap": 501,
|
||||
"Fanart": 508,
|
||||
"Media Info": 505,
|
||||
"Media Info 2": 504,
|
||||
"Media Info 3": 503,
|
||||
"Media Info 4": 515,
|
||||
"Wide": 505,
|
||||
"Info": 550,
|
||||
"Info 2": 551
|
||||
},
|
||||
"movie":{
|
||||
"List": 50,
|
||||
"Big List": 51,
|
||||
"Thumbnail": 500,
|
||||
"Poster Wrap": 501,
|
||||
"Fanart": 508,
|
||||
"Media Info": 505,
|
||||
"Media Info 2": 504,
|
||||
"Media Info 3": 503
|
||||
},
|
||||
"tvshow":{
|
||||
"List": 50,
|
||||
"Big List": 51,
|
||||
"Thumbnail": 500,
|
||||
"Poster Wrap": 501,
|
||||
"Fanart": 508,
|
||||
"Media Info": 505,
|
||||
"Media Info 2": 504,
|
||||
"Media Info 3": 503,
|
||||
"Wide": 505
|
||||
},
|
||||
"season":{
|
||||
"List": 50,
|
||||
"Big List": 51,
|
||||
"Thumbnail": 500,
|
||||
"Poster Wrap": 501,
|
||||
"Media Info": 505,
|
||||
"Media Info 2": 504,
|
||||
"Media Info 3": 503
|
||||
},
|
||||
"episode":{
|
||||
"List": 50,
|
||||
"Big List": 51,
|
||||
"Thumbnail": 500,
|
||||
"Media Info": 505,
|
||||
"Media Info 2": 504,
|
||||
"Media Info 3": 503
|
||||
},
|
||||
"addon":{
|
||||
"List": 50,
|
||||
"Big List": 51,
|
||||
"Thumbnail": 500,
|
||||
"Info": 550,
|
||||
"Info 2": 551
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# by DrZ3r0
|
||||
|
||||
import urllib, re
|
||||
import urllib
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger, config, platformtools
|
||||
from platformcode import logger, config
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import config
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "no longer exists" in data or "to copyright issues" in data:
|
||||
return False, "[animeid] El video ha sido borrado"
|
||||
return False, config.get_localized_string(70449) % "animeid"
|
||||
if "please+try+again+later." in data:
|
||||
return False, "[animeid] Error de animeid, no se puede generar el enlace al video"
|
||||
return True, ""
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import urllib
|
||||
|
||||
from core import httptools, jsontools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
# --------------------------------------------------------
|
||||
# Conector ArchiveOrg By Alfa development Group
|
||||
# --------------------------------------------------------
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import config
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url)
|
||||
if data.code == 404:
|
||||
return False, "[ArchiveOrg] El archivo no existe o ha sido borrado"
|
||||
return False, config.get_localized_string(70449) % "ArchiveOrg"
|
||||
return True, ""
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
if 'http://' in page_url: # fastids
|
||||
page_url = httptools.downloadpage(page_url, follow_redirects=False).headers['location']
|
||||
page_url = httptools.downloadpage(page_url, follow_redirects=False, only_headers=True).headers['location']
|
||||
page_url = scrapertools.find_single_match(page_url, 'backin.net/([a-zA-Z0-9]+)')
|
||||
global data
|
||||
data = httptools.downloadpage("http://backin.net/stream-%s-500x400.html" % page_url).data
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
# --------------------------------------------------------
|
||||
# Conector Badshare By Alfa development Group
|
||||
# --------------------------------------------------------
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import config
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
@@ -14,7 +15,7 @@ def test_video_exists(page_url):
|
||||
global page
|
||||
page = httptools.downloadpage(page_url)
|
||||
if not page.sucess:
|
||||
return False, "[Badshare] El fichero no existe o ha sido borrado"
|
||||
return False, config.get_localized_string(70449) % "Badshare"
|
||||
return True, ""
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import time
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import config
|
||||
from platformcode import logger
|
||||
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36'}
|
||||
@@ -12,7 +13,7 @@ def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "Archive no Encontrado" in data:
|
||||
return False, "[bdupload] El fichero ha sido borrado"
|
||||
return False, config.get_localized_string(70449) % "bdupload"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import config
|
||||
from platformcode import logger
|
||||
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36'}
|
||||
@@ -10,7 +10,7 @@ def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "Archive no Encontrado" in data or "File has been removed" in data:
|
||||
return False, "[bitertv] El fichero ha sido borrado"
|
||||
return False, config.get_localized_string(70449) % "bitertv"
|
||||
return True, ""
|
||||
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
# Conector para bitporno
|
||||
# https://github.com/alfa-addon
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import config
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "Object not found" in data or "no longer exists" in data or '"sources": [false]' in data:
|
||||
return False, "[bitp] El archivo no existe o ha sido borrado"
|
||||
return False, config.get_localized_string(70449) % "bitp"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
# Conector Cinemaupload By Alfa development Group
|
||||
# --------------------------------------------------------
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import config
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
@@ -12,7 +14,7 @@ def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url)
|
||||
if data.code == 404:
|
||||
return False, "[CinemaUpload] El archivo no existe o ha sido borrado"
|
||||
return False, config.get_localized_string(70449) % "CinemaUpload"
|
||||
return True, ""
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
|
||||
from platformcode import config
|
||||
|
||||
PY3 = False
|
||||
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
|
||||
|
||||
@@ -23,7 +25,7 @@ def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = get_data(page_url.replace(".org", ".me"))
|
||||
if "File Not Found" in data: return False, "[Clicknupload] El archivo no existe o ha sido borrado"
|
||||
if "File Not Found" in data: return False, config.get_localized_string(70449) % "Clicknupload"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from builtins import range
|
||||
import sys
|
||||
|
||||
from builtins import range
|
||||
|
||||
PY3 = False
|
||||
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
from platformcode import config
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ def test_video_exists(page_url):
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
if 'Not Found' in data or 'File is no longer available' in data:
|
||||
return False, "[Datoporn] El archivo no existe o ha sido borrado"
|
||||
return False, config.get_localized_string(70449) % "Datoporn"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ else:
|
||||
import time
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import config, logger
|
||||
from platformcode import platformtools
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import urllib
|
||||
import time
|
||||
import urllib
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger, config
|
||||
from lib import jsunpack
|
||||
from platformcode import logger, config
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
# --------------------------------------------------------
|
||||
# Conector DoStream By Alfa development Group
|
||||
# --------------------------------------------------------
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import config
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url)
|
||||
if data.code == 404:
|
||||
return False, "[Dostream] El archivo no existe o ha sido borrado"
|
||||
return False, config.get_localized_string(70449) % "Dostream"
|
||||
return True, ""
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import config
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ def test_video_exists(page_url):
|
||||
if "please+try+again+later." in data:
|
||||
return False, "[Downace] Error de downace, no se puede generar el enlace al video"
|
||||
if "File has been removed due to inactivity" in data:
|
||||
return False, "[Downace] El archivo ha sido removido por inactividad"
|
||||
return False, config.get_localized_string(70449) % "Downace"
|
||||
return True, ""
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import config
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
@@ -10,7 +11,7 @@ def test_video_exists(page_url):
|
||||
global data
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "<h2>WE ARE SORRY</h2>" in data or '<title>404 Not Found</title>' in data:
|
||||
return False, "[eporner] El fichero no existe o ha sido borrado"
|
||||
return False, config.get_localized_string(70449) % "eporner"
|
||||
return True, ""
|
||||
|
||||
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
# --------------------------------------------------------
|
||||
# Conector Estream By Alfa development Group
|
||||
# --------------------------------------------------------
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from platformcode import config
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
@@ -14,7 +15,7 @@ def test_video_exists(page_url):
|
||||
data = httptools.downloadpage(page_url)
|
||||
|
||||
if data.code == 404:
|
||||
return False, "[Estream] El archivo no existe o ha sido borrado"
|
||||
return False, config.get_localized_string(70449) % "Estream"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||