Merge branch 'master' of github.com:kodiondemand/addon
This commit is contained in:
352
.github/ISSUE_TEMPLATE/test-canale.md
vendored
352
.github/ISSUE_TEMPLATE/test-canale.md
vendored
@@ -6,223 +6,283 @@ labels: Test Canale
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
Documento Template per il Test del canale (textile)
|
||||
|
||||
Di ogni test mantieni la voce dell'esito e cancella le altre, dove occorre aggiungi informazioni. Specifica, dove possibile, il tipo di problema che incontri in quel test.
|
||||
Copia-incolla nell'ISSUE aperto da PROJECT.
|
||||
|
||||
Specifica, dove possibile, il tipo di problema che incontri, anche se non è presente alcuna voce per indicarlo.
|
||||
Se hai suggerimenti/consigli/dubbi sui test...Proponili e/o chiedi!
|
||||
|
||||
|
||||
**Quando finisci il test, torna in PROJECT e sposta la scheda del canale testato, nella corrispettiva COLONNA: test non superato o test superato.
|
||||
In caso contrario verrà valutato come da terminare!**
|
||||
|
||||
**Avvertenze:**
|
||||
|
||||
Per il test dei canali al momento DEVI utilizzare la versione **MASTER** di KOD!
|
||||
|
||||
Quando fai il test puoi spuntare i quadratini con il mouse.
|
||||
*MA*
|
||||
Per poter scrivere eventuali problemi: **DEVI** cliccare sul tab **WRITE** dell'ISSUE aperto per il test.
|
||||
|
||||
* *SE hai un ERRORE con avviso di LOG, copia IMMEDIATAMENTE l'ERRORE dal file e copialo nell'ISSUE nel punto del TEST*
|
||||
|
||||
Se hai problemi non previsti dal test, segnalali aggiungendoli in fondo al test.
|
||||
|
||||
***
|
||||
I file relativi al canale li trovi:
|
||||
- su browser:
|
||||
"Apre la pagina dei Canali":https://github.com/kodiondemand/addon/tree/master/channels
|
||||
- * [sul device, nella specifica cartella](https://github.com/kodiondemand/addon/wiki/Percorsi-sui-diversi-S.O.), .kodi/addons/channels:
|
||||
Per aprirli non servono programmi particolari un semplice editor di testo è sufficiente.
|
||||
|
||||
Test N°.1: Lista Canali
|
||||
**Test N.1**: Controllo del file .json
|
||||
|
||||
Cosa serve: il file .json
|
||||
Occorrente: file .json
|
||||
|
||||
1. Verifica del canale nelle sezioni indicate nel file .json, voce "categories".
|
||||
**1. Indica la coerenza delle voci presenti in "language" con i contenuti presenti sul sito:**
|
||||
valori: ita, vosi (sub-ita)
|
||||
|
||||
- [ ] Tutte
|
||||
- [ ] Alcune - Indicare le sezioni dove manca il canale
|
||||
- [ ] Nessuna - Voce Canale mancante nella lista. In questo caso non puoi continuare il test.
|
||||
- [ ] coerenti
|
||||
- [ ] non coerenti
|
||||
|
||||
2. Icone del canale [ ]
|
||||
Se non sono coerenti il test è FALLITO, continua comunque a revisionare il resto
|
||||
|
||||
- [ ] Presenti
|
||||
- [ ] Non Presenti
|
||||
**4. Icone del canale**
|
||||
Controlla sia presente qualcosa, tra le " " di thumbnail e banner, e che le immagini appaiano su KoD
|
||||
|
||||
**in thumbnail:**
|
||||
- [ ] Presente
|
||||
- [ ] Assente
|
||||
|
||||
**in banner:**
|
||||
- [ ] Presente
|
||||
- [ ] Assente
|
||||
|
||||
**5. Verifica la coerenza delle voci presenti in "categories" con i contenuti presenti sul sito:**
|
||||
|
||||
Riepilogo voci:
|
||||
|
||||
movie, tvshow, anime, documentary, vos, adult
|
||||
|
||||
(se il sito contiene film e serie, devono esserci sia movie che tvshow, se contiene solo film, solo movie)
|
||||
|
||||
- [ ] Corrette
|
||||
- [ ] 1 o più Errata/e
|
||||
- [ ] Assenti - Non sono presenti voci in categories, in questo caso non puoi continuare il test.
|
||||
|
||||
Se le voci sono: Assenti, dopo aver compilato la risposta, salva il test e **NON** proseguire.
|
||||
**TEST FALLITO**
|
||||
|
||||
***
|
||||
|
||||
Test N°.2: Configura Canale
|
||||
**Test su KOD.**
|
||||
|
||||
1. Presenza della voce "Configura Canale"
|
||||
Entra in KOD -> Canali. Nella lista accedi al canale che stai testando.
|
||||
**N.B.**: Il nome del canale è il campo **name** nel file .json.
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
**Test N.2: Pagina Canale**
|
||||
|
||||
2. Voci presenti in Configura Canale
|
||||
1. Cerca o Cerca Film...
|
||||
Cerca un titolo a caso in KOD e lo stesso titolo sul sito. Confronta i risultati.
|
||||
|
||||
a. Cerca Informazioni extra (Default: Attivo)
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
|
||||
b. Includi in Novità (Default: Attivo)
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
|
||||
c. Includi in Novità - Italiano (Default: Attivo)
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
|
||||
d. Includi in ricerca globale (Default: Attivo)
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
|
||||
e. Verifica se i link esistono (Default: Attivo)
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
|
||||
f. Numero de link da verificare (Default: 10)
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
|
||||
g. Mostra link in lingua (Default: Non filtrare)
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
|
||||
***
|
||||
|
||||
Test N°.3: Voci menu nella pagina del Canale
|
||||
|
||||
1. Configurazione Autoplay
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
|
||||
2. Configurazione Canale
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
|
||||
***
|
||||
|
||||
Test N°.4: Confronto Sito - Pagina Canale
|
||||
|
||||
Cosa serve: il file .py, consultare la def mainlist()
|
||||
|
||||
Promemoria:
|
||||
della mainlist la struttura è:
|
||||
|
||||
( 'Voce menu1', ['/url/', etc, etc])
|
||||
( 'Voce menu2', ['', etc, etc])
|
||||
Dove url è una stringa aggiuntiva da aggiungere all'url principale, se in url appare '' allora corrisponde all'indirizzo principale del sito.
|
||||
|
||||
Questo Test confronta i titoli che trovi accedendo alle voci di menu del canale con quello che vedi nella corrispettiva pagina del sito.
|
||||
|
||||
- [Voce menu con problemi - Tipo di problema] ( copiare per tutte le voci che non hanno corrispondenza )
|
||||
Tipo di problema = mancano dei titoli, i titoli sono errati, ai titoli corrispondono locandine errate o altro
|
||||
|
||||
|
||||
I test successivi sono divisi a seconda si tratta di film, serie tv o anime.
|
||||
Cancella le sezioni non interessate dal canale. Verificale dalla voce "categories" del file .json.
|
||||
- [ ] OK
|
||||
- indica il tipo di problema
|
||||
|
||||
**Sezione FILM
|
||||
|
||||
Test da effettuare mentre sei nella pagina dei titoli. Per ogni titolo verfica ci siano le voci nel menu contestuale.
|
||||
**TestN.3: Pagina dei Titoli
|
||||
*Test da effettuare mentre sei dentro un menu del canale (film, serietv, in corso ecc..)*.
|
||||
Voci nel menu contestuale di KOD. Posizionati su di un titolo e controlla se hai le seguenti voci, nel menu contestuale (tasto c o tenendo enter premuto):
|
||||
|
||||
1. Aggiungi Film in videoteca
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
- [ ] Si
|
||||
- [ ] No
|
||||
|
||||
Aggiungi 2-3 titoli in videoteca. Verificheremo successivamente la videoteca.
|
||||
- [Aggiunti correttamente]
|
||||
- [Indica eventuali problemi] (copia-incolla per tutti i titoli con cui hai avuto il problema)
|
||||
2. Scarica Film (devi avere il download abilitato)
|
||||
|
||||
2. Scarica Film
|
||||
- [ ] Si
|
||||
- [ ] No
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
**Fine test menu contestuale
|
||||
|
||||
3. Paginazione ( cliccare sulla voce "Successivo" e verifica la 2° pagina nello stesso modo in cui lo hai fatto per la 1°)
|
||||
**Fondo pagina dei titoli
|
||||
|
||||
- [Ok]
|
||||
- [X - indica il tipo di problema]
|
||||
3. Paginazione, controlla cia sia la voce "Successivo" (se non c'è controlla sul sito se è presente)
|
||||
|
||||
4. Cerca o Cerca Film...
|
||||
Cerca un titolo a caso in KOD e lo stesso titolo sul sito. Confronta i risultati.
|
||||
- [ ] Sì
|
||||
- [ ] NO
|
||||
|
||||
- [Ok]
|
||||
- [X - indica il tipo di problema]
|
||||
**Dentro un titolo
|
||||
|
||||
5. Entra nella pagina del titolo, verifica che come ultima voce ci sia "Aggiungi in videoteca":
|
||||
4. Entra nella pagina del titolo e verifica ci sia almeno 1 server:
|
||||
|
||||
- [Si, appare]
|
||||
- [Non appare]
|
||||
- [ ] Si
|
||||
- [ ] No
|
||||
|
||||
6. Eventuali problemi riscontrati
|
||||
- [ scrivi qui il problema/i ]
|
||||
- scrivi qui il problema/i
|
||||
|
||||
**Sezione Serie TV
|
||||
|
||||
Test da effettuare mentre sei nella pagina dei titoli. Per ogni titolo verfica ci siano le voci nel menu contestuale.
|
||||
Test da effettuare mentre sei nella pagina dei titoli.
|
||||
Per ogni titolo verifica ci siano le voci nel menu contestuale.
|
||||
|
||||
1. Aggiungi Serie in videoteca
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
- [ ] Si
|
||||
- [ ] No
|
||||
|
||||
2. Aggiungi 2-3 titoli in videoteca. Verificheremo successivamente la videoteca.
|
||||
- [Aggiunti correttamente]
|
||||
- [Indica eventuali problemi] (copia-incolla per tutti i titoli con cui hai avuto il problema)
|
||||
2. Scarica Stagione (devi avere il download abilitato)
|
||||
|
||||
3. Scarica Serie
|
||||
- [ ] Si
|
||||
- [ ] No
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
3. Scarica Serie (devi avere il download abilitato)
|
||||
|
||||
- [ ] Si
|
||||
- [ ] No
|
||||
|
||||
4. Cerca o Cerca Serie...
|
||||
Cerca un titolo a caso in KOD e lo stesso titolo sul sito. Confronta i risultati.
|
||||
|
||||
- [Ok]
|
||||
- [X - indica il tipo di problema]
|
||||
- [ ] Ok
|
||||
- indica il tipo di problema
|
||||
|
||||
5. Entra nella pagina della serie, verifica che come ultima voce ci sia "Aggiungi in videoteca":
|
||||
|
||||
- [Non appare]
|
||||
- [Si, appare]
|
||||
- [ ] Si, appare
|
||||
- [ ] Non appare
|
||||
|
||||
6. Entra nella pagina dell'episodio, NON deve apparire la voce "Aggiungi in videoteca":
|
||||
6. Entra nella pagina dell'episodio, **NON** deve apparire la voce "Aggiungi in videoteca":
|
||||
|
||||
- [Non appare]
|
||||
- [Si, appare]
|
||||
- [ ] Si, appare
|
||||
- [ ] Non appare
|
||||
|
||||
7. Eventuali problemi riscontrati
|
||||
- [ scrivi qui il problema/i ]
|
||||
- scrivi qui il problema/i
|
||||
|
||||
**Sezione Anime
|
||||
|
||||
Test da effettuare mentre sei nella pagina dei titoli. Per ogni titolo verfica ci siano le voci nel menu contestuale.
|
||||
Test da effettuare mentre sei nella pagina dei titoli. Per ogni titolo verifica ci siano le voci nel menu contestuale.
|
||||
|
||||
1. Aggiungi Serie in videoteca
|
||||
1. Rinumerazione (se gli episodi non appaiono nella forma 1x01)
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
- [ ] Si
|
||||
- [ ] No
|
||||
|
||||
2. Aggiungi 2-3 titoli in videoteca. Verificheremo successivamente la videoteca.
|
||||
- [Aggiunti correttamente]
|
||||
2. Aggiungi Serie in videoteca
|
||||
|
||||
- [ ] Si
|
||||
- [ ] No
|
||||
|
||||
3. Aggiungi 2-3 titoli in videoteca.
|
||||
- [ ] Aggiunti correttamente
|
||||
- [Indica eventuali problemi] (copia-incolla per tutti i titoli con cui hai avuto il problema)
|
||||
|
||||
3. Scarica Serie
|
||||
- COPIA qui l'ERRORE dal LOG
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
4. Scarica Serie
|
||||
|
||||
4. Rinumerazione
|
||||
|
||||
- [Si]
|
||||
- [No]
|
||||
- [ ] Si
|
||||
- [ ] No
|
||||
|
||||
5. Cerca o Cerca Serie...
|
||||
Cerca un titolo a caso in KOD e lo stesso titolo sul sito. Confronta i risultati.
|
||||
|
||||
- [Ok]
|
||||
- [X - indica il tipo di problema]
|
||||
- [ ] Ok
|
||||
- indica il tipo di problema
|
||||
|
||||
6. Entra nella pagina della serie, verifica che come ultima voce ci sia "Aggiungi in videoteca":
|
||||
6. Entra nella pagina della serie, verifica che come ultima voce ci sia "Aggiungi in videoteca":
|
||||
|
||||
- [Si, appare]
|
||||
- [Non appare]
|
||||
- [ ] Appare
|
||||
- [ ] Non appare
|
||||
|
||||
7. Entra nella pagina dell'episodio, NON deve apparire la voce "Aggiungi in videoteca":
|
||||
7. Entra nella pagina dell'episodio, NON ci deve essere la voce "Aggiungi in videoteca":
|
||||
|
||||
- [Non appare]
|
||||
- [Si, appare]
|
||||
- [ ] Non appare
|
||||
- [ ] Appare
|
||||
|
||||
8. Eventuali problemi riscontrati
|
||||
- [ scrivi qui il problema/i ]
|
||||
- scrivi qui il problema/i
|
||||
|
||||
**Fine test del canale preso singolarmente!!!
|
||||
** TEST PER IL CONFRONTO TRA SITO E CANALE **
|
||||
|
||||
TestN.4: Pagina Sito - Menu Canale
|
||||
|
||||
Occorrente: Browser, KOD! e il file canale.py ( da browser o da file )
|
||||
Avviso:
|
||||
- Sul Browser disattiva eventuali componenti aggiuntivi che bloccano i JS (javascript), li riattivi alla fine del test.
|
||||
|
||||
Entra in ogni menu e controlla che i risultati siano gli stessi che trovi sul sito, comprese le varie info (ita/sub-ita, qualità ecc..), inoltre entra, se ci sono, nei menu dei generi - anni - lettera, verifica che cliccando su una voce si visualizzino i titoli.
|
||||
|
||||
*Copia questa sezione per ogni voce che presenta problemi:*
|
||||
|
||||
- [ ] Voce menu ( del canale dove riscontri errori)
|
||||
|
||||
Titoli non corrispondenti:
|
||||
|
||||
- [ ] Il totale dei Titoli è diverso da quello del sito. Alcuni Titoli non compaiono.
|
||||
- [ ] Appaiono titoli per pagine informative o link a siti esterni. Es: Avviso agli utenti.
|
||||
- [ ] La lingua, del titolo, è diversa da quella riportata dal sito
|
||||
- [ ] Non è indicato in 1 o più titoli che sono SUB-ITA
|
||||
- [ ] Cliccando su "Successivo" non si visualizzano titoli
|
||||
- [ ] Non è indicata la qualità: Hd-DVD/rip e altri, nonostante sul sito siano presenti
|
||||
|
||||
- [ ] NO
|
||||
|
||||
|
||||
*Fine Copia*
|
||||
|
||||
|
||||
Test.N8: Ricerca Globale
|
||||
|
||||
Per questo test ti consiglio di inserire come UNICO sito quello che stai testando, come canale incluso in: Ricerca Globale -> scegli i canali da includere
|
||||
Il test è già compilato con le spunte, dato che devi copiarlo solo in caso di errori. Togli la spunta dove funziona.
|
||||
Si consiglia di cercare almeno a fino 5 titoli. O perlomeno non fermarti al 1°.
|
||||
|
||||
Cerca 5 FILM a tuo piacimento, se il titolo non esce controlla, confronta i risultati sul sito...:
|
||||
|
||||
*Copia questa sezione per ogni voce che presenta problemi*
|
||||
|
||||
controlla ci siano queste voci se titolo è un FILM:
|
||||
|
||||
- [ ] inserisci il titolo cercato che da problemi
|
||||
- [x] Aggiungi in videoteca
|
||||
- [x] Scarica Film
|
||||
|
||||
*Fine Copia*
|
||||
|
||||
controlla ci siano queste voci se titolo è una SERIE/ANIME:
|
||||
|
||||
*Copia questa sezione per ogni voce che presenta problemi*
|
||||
|
||||
controlla ci siano queste voci se titolo è un FILM:
|
||||
|
||||
- [ ] inserisci il titolo cercato che da problemi
|
||||
- [x] Aggiungi in videoteca
|
||||
- [x] Scarica Serie
|
||||
- [x] Scarica Stagione
|
||||
|
||||
- [ ] inserisci il titolo cercato che da problemi
|
||||
|
||||
*Fine Copia*
|
||||
|
||||
|
||||
Se il canale ha la parte Novità.
|
||||
|
||||
Test.N7: Novità.
|
||||
Per questo test ti consiglio di inserire come UNICO sito quello che stai testando, come canale incluso in: Novità -> categoria (film, serie o altro )
|
||||
|
||||
- [ ] Descrivere il problema
|
||||
|
||||
Fine TEST!
|
||||
|
||||
SALVA
|
||||
|
||||
Se non hai riscontrato problemi, vai in PROJECT e sposta la scheda nella colonna:
|
||||
TEST SUPERATO
|
||||
altrimenti nella colonna
|
||||
TEST NON SUPERATO!
|
||||
|
||||
Grazie mille da parte di tutto il team KoD!
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"name": "AnimeWorld",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita", "vos"],
|
||||
"language": ["ita", "vosi"],
|
||||
"thumbnail": "animeworld.png",
|
||||
"banner": "animeworld.png",
|
||||
"categories": ["anime", "vos"],
|
||||
|
||||
@@ -124,9 +124,10 @@ def peliculas(item):
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
anime=True
|
||||
pagination = 50
|
||||
data = support.match(item, headers=headers)[1]
|
||||
if 'VVVVID' in data: patronBlock= r'<div class="server\s*active\s*"(?P<block>.*?)</ul>'
|
||||
else: patronblock= 'server active(?P<block>.*?)server hidden'
|
||||
else: patronBlock= r'server active(?P<block>.*?)server hidden '
|
||||
patron = r'<li><a [^=]+="[^"]+"[^=]+="[^"]+"[^=]+="[^"]+"[^=]+="[^"]+"[^=]+="[^"]+" href="(?P<url>[^"]+)"[^>]+>(?P<episode>[^<]+)<'
|
||||
def itemHook(item):
|
||||
item.title += support.typo(item.fulltitle,'-- bold')
|
||||
|
||||
@@ -125,6 +125,7 @@ def episodios(item):
|
||||
title = match[0]+'x'+match[1] + ' - ' + item.fulltitle
|
||||
else:
|
||||
title = 'Episodio ' + key['number'].encode('ascii', 'replace') + ' - ' + key['title'],
|
||||
if type(title) == tuple: title = title[0]
|
||||
itemlist.append(
|
||||
Item(
|
||||
channel = item.channel,
|
||||
@@ -164,7 +165,7 @@ def findvideos(item):
|
||||
url= 'https://or01.top-ix.org/videomg/_definst_/mp4:' + item.url + '/' + url,
|
||||
server= 'directo')
|
||||
)
|
||||
return support.server(item, itemlist=itemlist, download=False)
|
||||
return support.server(item, itemlist=itemlist, down_load=False)
|
||||
|
||||
def make_itemlist(itemlist, item, data):
|
||||
search = item.search if item.search else ''
|
||||
@@ -185,7 +186,6 @@ def make_itemlist(itemlist, item, data):
|
||||
contentType = item.contentType,
|
||||
contentSerieName= key['title'] if item.contentType != 'movie' else '',
|
||||
contentTitle= key['title'] if item.contentType == 'movie' else '',
|
||||
thumbnail= key['thumbnail'],
|
||||
infoLabels=infoLabels
|
||||
))
|
||||
return itemlist
|
||||
@@ -227,40 +227,48 @@ def get_default_settings(channel_name):
|
||||
default_controls = jsontools.load(filetools.read(default_path)).get('settings', list())
|
||||
default_controls_renumber = jsontools.load(filetools.read(default_path)).get('renumber', list())
|
||||
categories = get_channel_json(channel_name).get('categories', list())
|
||||
not_active = get_channel_json(channel_name).get('not_active', list())
|
||||
default_off = get_channel_json(channel_name).get('default_off', list())
|
||||
|
||||
# Apply default configurations if they do not exist
|
||||
for control in default_controls:
|
||||
if control['id'] not in str(channel_controls):
|
||||
if 'include_in_newest' in control['id']:
|
||||
if 'include_in_newest' in control['id'] and 'include_in_newest' not in not_active:
|
||||
label = control['id'].split('_')
|
||||
label = label[-1]
|
||||
if label == 'peliculas':
|
||||
if 'movie' in categories:
|
||||
control['label'] = config.get_localized_string(70727) + ' - ' + config.get_localized_string(30122)
|
||||
control['default'] = True if 'include_in_newest' not in default_off else False
|
||||
channel_controls.append(control)
|
||||
else: pass
|
||||
elif label == 'series':
|
||||
if 'tvshow' in categories:
|
||||
control['label'] = config.get_localized_string(70727) + ' - ' + config.get_localized_string(30123)
|
||||
control['default'] = True if 'include_in_newest' not in default_off else False
|
||||
channel_controls.append(control)
|
||||
else: pass
|
||||
elif label == 'anime':
|
||||
if 'anime' in categories:
|
||||
control['label'] = config.get_localized_string(70727) + ' - ' + config.get_localized_string(30124)
|
||||
control['default'] = True if 'include_in_newest' not in default_off else False
|
||||
channel_controls.append(control)
|
||||
else: pass
|
||||
|
||||
else:
|
||||
control['label'] = config.get_localized_string(70727) + ' - ' + label.capitalize()
|
||||
control['default'] = True if control['id'] not in default_off else False
|
||||
channel_controls.append(control)
|
||||
|
||||
elif control['id'] == 'filter_languages':
|
||||
if len(channel_language) > 1:
|
||||
control['lvalues'] = list_language
|
||||
channel_controls.append(control)
|
||||
else: pass
|
||||
# elif control['id'] == 'filter_languages':
|
||||
# if len(channel_language) > 1:
|
||||
# control['lvalues'] = list_language
|
||||
# channel_controls.append(control)
|
||||
# else: pass
|
||||
|
||||
else:
|
||||
elif control['id'] not in not_active:
|
||||
if type(control['default']) == bool:
|
||||
control['default'] = True if control['id'] not in default_off else False
|
||||
channel_controls.append(control)
|
||||
|
||||
if renumber:
|
||||
|
||||
@@ -323,7 +323,7 @@ def scrape(func):
|
||||
itemlist = []
|
||||
|
||||
args = func(*args)
|
||||
log('STACK= ',inspect.stack()[1][3])
|
||||
# log('STACK= ',inspect.stack()[1][3])
|
||||
|
||||
item = args['item']
|
||||
|
||||
@@ -345,7 +345,8 @@ def scrape(func):
|
||||
typeActionDict = args['type_action_dict'] if 'type_action_dict' in args else {}
|
||||
typeContentDict = args['type_content_dict'] if 'type_content_dict' in args else {}
|
||||
debug = args['debug'] if 'debug' in args else False
|
||||
if 'pagination' in args and inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes']: pagination = args['pagination'] if args['pagination'] else 20
|
||||
log('STACK= ', inspect.stack()[1][3])
|
||||
if 'pagination' in args and inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'manual_renumeration']: pagination = args['pagination'] if args['pagination'] else 20
|
||||
else: pagination = ''
|
||||
lang = args['deflang'] if 'deflang' in args else ''
|
||||
pag = item.page if item.page else 1 # pagination
|
||||
@@ -772,7 +773,7 @@ def download(itemlist, item, typography='', function_level=1, function=''):
|
||||
if itemlist and item.contentChannel != 'videolibrary':
|
||||
itemlist.append(
|
||||
Item(channel='downloads',
|
||||
fromchannel=item.channel,
|
||||
from_channel=item.channel,
|
||||
title=title,
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.fulltitle,
|
||||
@@ -786,7 +787,7 @@ def download(itemlist, item, typography='', function_level=1, function=''):
|
||||
if fromaction == 'episodios':
|
||||
itemlist.append(
|
||||
Item(channel='downloads',
|
||||
fromchannel=item.channel,
|
||||
from_channel=item.channel,
|
||||
title=typo(config.get_localized_string(60357),typography),
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.fulltitle,
|
||||
@@ -879,7 +880,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):
|
||||
def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=True, down_load=True):
|
||||
|
||||
if not data:
|
||||
data = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True).data
|
||||
@@ -897,7 +898,7 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru
|
||||
videoitem.channel = item.channel
|
||||
videoitem.contentType = item.contentType
|
||||
|
||||
return controls(itemlist, item, AutoPlay, CheckLinks)
|
||||
return controls(itemlist, item, AutoPlay, CheckLinks, down_load)
|
||||
|
||||
def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True):
|
||||
from core import jsontools
|
||||
|
||||
@@ -56,15 +56,6 @@
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "3", "5", "10", "15", "20" ]
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "@30019",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": ["Non Filtrare"]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -76,14 +67,6 @@
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "autorenumber_mode",
|
||||
"type": "bool",
|
||||
"label": "@70688",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -584,8 +584,10 @@ def set_context_commands(item, parent_item):
|
||||
action="set_custom_start",
|
||||
parent=item.tourl()).tourl())))
|
||||
|
||||
if item.channel != "videolibrary":
|
||||
if (item.channel != "videolibrary" and not config.get_localized_string(70585) in str(item.context)) \
|
||||
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
|
||||
logger.info('context= '+ str(item.context))
|
||||
if item.action in ["episodios", "get_episodios"] 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",
|
||||
@@ -596,7 +598,8 @@ def set_context_commands(item, parent_item):
|
||||
(sys.argv[0], item.clone(action="add_pelicula_to_library",
|
||||
from_action=item.action).tourl())))
|
||||
|
||||
if item.channel != "downloads" and item.channel != "videolibrary" and downloadenabled != "false":
|
||||
if (item.channel != "downloads" and item.channel != "videolibrary" and downloadenabled != "false" and not config.get_localized_string(70585) in str(item.context))\
|
||||
or (item.channel != "downloads" and item.channel != "videolibrary" and downloadenabled != "false" and config.get_localized_string(70585) in str(item.context) and config.get_localized_string(70714) in str(item.context)):
|
||||
# Descargar pelicula
|
||||
if item.contentType == "movie":
|
||||
context_commands.append((config.get_localized_string(60354), "XBMC.RunPlugin(%s?%s)" %
|
||||
|
||||
@@ -5636,3 +5636,27 @@ msgstr ""
|
||||
msgctxt "#70729"
|
||||
msgid "Always add the highest quality"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70730"
|
||||
msgid ""
|
||||
msgstr "Seleziona il metodo di rinumerazione"
|
||||
|
||||
msgctxt "#70731"
|
||||
msgid ""
|
||||
msgstr "Semi-Automatico"
|
||||
|
||||
msgctxt "#70732"
|
||||
msgid ""
|
||||
msgstr "Manuale"
|
||||
|
||||
msgctxt "#70733"
|
||||
msgid ""
|
||||
msgstr "Digita il numero della Serie"
|
||||
|
||||
msgctxt "#70734"
|
||||
msgid ""
|
||||
msgstr "Seleziona gli Episodi della Serie %s"
|
||||
|
||||
msgctxt "#70735"
|
||||
msgid ""
|
||||
msgstr "Numero dell'Episodio Speciale"
|
||||
|
||||
@@ -5636,3 +5636,27 @@ msgstr "Includi in Ricerca Globale"
|
||||
msgctxt "#70729"
|
||||
msgid "Always add the highest quality"
|
||||
msgstr "Aggiungi sempre la qualità più alta"
|
||||
|
||||
msgctxt "#70730"
|
||||
msgid "Select the renumbering method"
|
||||
msgstr "Seleziona il metodo di rinumerazione"
|
||||
|
||||
msgctxt "#70731"
|
||||
msgid "Semi-Automatic"
|
||||
msgstr "Semi-Automatico"
|
||||
|
||||
msgctxt "#70732"
|
||||
msgid "Manual"
|
||||
msgstr "Manuale"
|
||||
|
||||
msgctxt "#70733"
|
||||
msgid "Enter the Series number"
|
||||
msgstr "Digita il numero della Serie"
|
||||
|
||||
msgctxt "#70734"
|
||||
msgid "Select Series %s Episodes"
|
||||
msgstr "Seleziona gli Episodi della Serie %s"
|
||||
|
||||
msgctxt "#70735"
|
||||
msgid "%s Special Episode Number"
|
||||
msgstr "Numero dell'Episodio Speciale"
|
||||
|
||||
@@ -31,10 +31,10 @@ try:
|
||||
import xbmcgui
|
||||
except:
|
||||
xbmcgui = None
|
||||
|
||||
import xbmc
|
||||
import re, base64, json, os
|
||||
from core import jsontools, tvdb, scrapertoolsV2
|
||||
from core.support import typo, log
|
||||
from core.support import typo, log, dbg
|
||||
from platformcode import config, platformtools, logger
|
||||
from platformcode.config import get_setting
|
||||
|
||||
@@ -44,6 +44,10 @@ TAG_SEASON = "Season"
|
||||
TAG_EPISODE = "Episode"
|
||||
TAG_SPECIAL = "Special"
|
||||
TAG_MODE = "Mode"
|
||||
TAG_EPLIST = "EpList"
|
||||
TAG_CHECK = "ReCheck"
|
||||
TAG_SPLIST = "SpList"
|
||||
TAG_TYPE = "Type"
|
||||
|
||||
__channel__ = "autorenumber"
|
||||
|
||||
@@ -59,11 +63,77 @@ def context(exist):
|
||||
if access():
|
||||
modify = config.get_localized_string(70714) if exist else ''
|
||||
_context = [{"title": typo(modify + config.get_localized_string(70585), 'bold'),
|
||||
"action": "semiautomatic_config_item",
|
||||
"channel": "autorenumber"}]
|
||||
"action": "select_type",
|
||||
"channel": "autorenumber",}]
|
||||
|
||||
return _context
|
||||
|
||||
def select_type(item):
|
||||
select = platformtools.dialog_select(config.get_localized_string(70730),[config.get_localized_string(70731), config.get_localized_string(70732)])
|
||||
if select == 0: semiautomatic_config_item(item)
|
||||
else: manual_renumeration(item)
|
||||
|
||||
def manual_renumeration(item):
|
||||
log()
|
||||
_list = []
|
||||
EpisodeDict = {}
|
||||
item.channel = item.from_channel
|
||||
title = item.show if item.show else item.fulltitle
|
||||
dict_series = jsontools.get_node_from_file(item.channel, TAG_TVSHOW_RENUMERATE)
|
||||
dict_series[title] = {}
|
||||
dict_series[title][TAG_TYPE] = 'manual'
|
||||
jsontools.update_node(dict_series, item.channel, TAG_TVSHOW_RENUMERATE)[0]
|
||||
tvdb.find_and_set_infoLabels(item)
|
||||
|
||||
# Trova l'ID della serie
|
||||
while not item.infoLabels['tvdb_id']:
|
||||
try:
|
||||
item.show = platformtools.dialog_input(default=item.show, heading=config.get_localized_string(30112)) # <- Enter title to search
|
||||
tvdb.find_and_set_infoLabels(item)
|
||||
except:
|
||||
heading = config.get_localized_string(70704) # <- TMDB ID (0 to cancel)
|
||||
info = platformtools.dialog_numeric(0, heading)
|
||||
item.infoLabels['tvdb_id'] = '0' if info == '' else info
|
||||
|
||||
if item.infoLabels['tvdb_id']:
|
||||
ID = item.infoLabels['tvdb_id']
|
||||
dict_renumerate = {TAG_ID: ID}
|
||||
dict_series[title] = dict_renumerate
|
||||
|
||||
channel = __import__('channels.' + item.channel, fromlist=["channels.%s" % item.channel])
|
||||
itemlist = channel.episodios(item)
|
||||
for item in itemlist:
|
||||
Title = re.sub(r'\d+x\d+ - ', '', item.title)
|
||||
if item.action == 'findvideos':
|
||||
_list.append(Title)
|
||||
|
||||
count = 1
|
||||
while len(_list) > 0:
|
||||
season = platformtools.dialog_numeric(0, config.get_localized_string(70733))
|
||||
selected = platformtools.dialog_multiselect(config.get_localized_string(70734) % season, _list)
|
||||
if selected == None: break
|
||||
for select in selected:
|
||||
ep = scrapertoolsV2.find_single_match(_list[select], r'(\d+)')
|
||||
if season == '0':
|
||||
episode = ''
|
||||
while not episode:
|
||||
episode = platformtools.dialog_numeric(0, config.get_localized_string(70735) % _list[select] )
|
||||
EpisodeDict[ep] = '%sx%s' %(season, episode.zfill(2))
|
||||
else:
|
||||
EpisodeDict[ep] = '%sx%s' %(season, str(count).zfill(2))
|
||||
count += 1
|
||||
|
||||
for select in reversed(selected):
|
||||
del _list[select]
|
||||
if len(_list) == 0:
|
||||
EpisodeDict = base64.b64encode(json.dumps(EpisodeDict))
|
||||
dict_series[title][TAG_EPISODE] = EpisodeDict
|
||||
else:
|
||||
dict_series[title] = {}
|
||||
jsontools.update_node(dict_series, item.channel, TAG_TVSHOW_RENUMERATE)[0]
|
||||
xbmc.executebuiltin("Container.Refresh")
|
||||
|
||||
|
||||
def semiautomatic_config_item(item):
|
||||
log()
|
||||
# Configurazione Semi Automatica, utile in caso la numerazione automatica fallisca
|
||||
@@ -73,7 +143,7 @@ def semiautomatic_config_item(item):
|
||||
dict_series = jsontools.get_node_from_file(item.channel, TAG_TVSHOW_RENUMERATE)
|
||||
title = item.show
|
||||
|
||||
# Trova l'ID dellla serie
|
||||
# Trova l'ID della serie
|
||||
while not item.infoLabels['tvdb_id']:
|
||||
try:
|
||||
item.show = platformtools.dialog_input(default=item.show, heading=config.get_localized_string(30112)) # <- Enter title to search
|
||||
@@ -102,9 +172,9 @@ def semiautomatic_config_item(item):
|
||||
season = platformtools.dialog_numeric(0, heading, '1')
|
||||
dict_renumerate[TAG_SEASON] = season
|
||||
|
||||
########### PROVVISORIO ###################
|
||||
|
||||
mode = platformtools.dialog_yesno(config.get_localized_string(70687), config.get_localized_string(70688), nolabel=config.get_localized_string(30023), yeslabel=config.get_localized_string(30022))
|
||||
if mode == 1:
|
||||
if mode == True:
|
||||
dict_renumerate[TAG_MODE] = False
|
||||
specials = []
|
||||
stop = False
|
||||
@@ -116,31 +186,13 @@ def semiautomatic_config_item(item):
|
||||
dict_renumerate[TAG_SPECIAL] = specials
|
||||
else: stop = True
|
||||
dict_renumerate[TAG_MODE] = False
|
||||
# Richede se ci sono speciali nella stagione
|
||||
# mode = platformtools.dialog_yesno(config.get_localized_string(70687), config.get_localized_string(70688), nolabel=config.get_localized_string(30023), yeslabel=config.get_localized_string(30022))
|
||||
# if mode == 0: dict_renumerate[TAG_MODE] = False
|
||||
# else:
|
||||
# select = platformtools.dialog_yesno(config.get_localized_string(70687), config.get_localized_string(70717), nolabel=config.get_localized_string(30023), yeslabel=config.get_localized_string(30022))
|
||||
# if select == 0:
|
||||
# dict_renumerate[TAG_MODE] = False
|
||||
# specials = []
|
||||
# stop = False
|
||||
# while not stop:
|
||||
# heading = config.get_localized_string(70718) + str(specials)
|
||||
# special = platformtools.dialog_numeric(0, heading, '')
|
||||
# if special:
|
||||
# specials.append(int(special))
|
||||
# dict_renumerate[TAG_SPECIAL] = specials
|
||||
# else: stop = True
|
||||
# else:
|
||||
# dict_renumerate[TAG_MODE] = True
|
||||
########### PROVVISORIO ###################
|
||||
|
||||
|
||||
dict_renumerate[TAG_TYPE] = 'auto'
|
||||
# Imposta la voce Episode
|
||||
dict_renumerate[TAG_EPISODE] = ''
|
||||
# Scrive nel json
|
||||
jsontools.update_node(dict_series, item.channel, TAG_TVSHOW_RENUMERATE)[0]
|
||||
xbmc.executebuiltin("Container.Refresh")
|
||||
|
||||
else:
|
||||
message = config.get_localized_string(60444)
|
||||
@@ -148,7 +200,6 @@ def semiautomatic_config_item(item):
|
||||
platformtools.dialog_notification(heading, message)
|
||||
|
||||
|
||||
|
||||
def config_item(item, itemlist=[], typography='', active=False):
|
||||
log()
|
||||
# Configurazione Automatica, Tenta la numerazione Automatica degli episodi
|
||||
@@ -161,7 +212,6 @@ def config_item(item, itemlist=[], typography='', active=False):
|
||||
# Pulizia del Titolo
|
||||
if any( word in title.lower() for word in ['specials', 'speciali']):
|
||||
item.show = re.sub(r'\sspecials|\sspeciali', '', item.show.lower())
|
||||
log('ITEM SHOW= ',item.show)
|
||||
tvdb.find_and_set_infoLabels(item)
|
||||
elif not item.infoLabels['tvdb_id']:
|
||||
item.show = title.rstrip('123456789 ')
|
||||
@@ -192,42 +242,55 @@ def config_item(item, itemlist=[], typography='', active=False):
|
||||
|
||||
def renumber(itemlist, item='', typography=''):
|
||||
log()
|
||||
if 'fromchannel' in item:
|
||||
item.channel = item.fromchannel if item.fromchannel else item.channel
|
||||
# Carica Impostazioni
|
||||
settings_node = jsontools.get_node_from_file(itemlist[0].channel, 'settings')
|
||||
try: dict_series = jsontools.get_node_from_file(itemlist[0].channel, TAG_TVSHOW_RENUMERATE)
|
||||
except: dict_series = {}
|
||||
|
||||
# Seleziona la funzione Adatta, Menu Contestuale o Rinumerazione
|
||||
if item:
|
||||
settings_node = jsontools.get_node_from_file(item.channel, 'settings')
|
||||
if 'from_channel' in item:
|
||||
item.channel = item.from_channel if item.from_channel else item.channel
|
||||
# Controlla se la Serie è già stata rinumerata
|
||||
TITLE = item.fulltitle.rstrip() if item.fulltitle else item.contentTitle
|
||||
if dict_series[TITLE].has_key(TAG_TYPE):
|
||||
TYPE = dict_series[TITLE][TAG_TYPE]
|
||||
else:
|
||||
TYPE = 'auto'
|
||||
dict_series[TITLE][TAG_TYPE] = TYPE
|
||||
jsontools.update_node(dict_series, item.channel, TAG_TVSHOW_RENUMERATE)[0]
|
||||
|
||||
try:
|
||||
dict_series = jsontools.get_node_from_file(item.channel, TAG_TVSHOW_RENUMERATE)
|
||||
TITLE = item.fulltitle.rstrip()
|
||||
if TYPE == 'manual':
|
||||
return itemlist
|
||||
|
||||
elif dict_series.has_key(TITLE) and dict_series[TITLE].has_key(TAG_ID):
|
||||
ID = dict_series[TITLE][TAG_ID]
|
||||
|
||||
exist = True
|
||||
except:
|
||||
exist = False
|
||||
|
||||
if exist:
|
||||
ID = dict_series[TITLE][TAG_ID]
|
||||
SEASON = dict_series[TITLE][TAG_SEASON]
|
||||
EPISODE = dict_series[TITLE][TAG_EPISODE]
|
||||
MODE = dict_series[TITLE][TAG_MODE]
|
||||
|
||||
if dict_series[TITLE].has_key(TAG_SEASON): SEASON = dict_series[TITLE][TAG_SEASON]
|
||||
else: SEASON = ''
|
||||
|
||||
if dict_series[TITLE].has_key(TAG_MODE): MODE = dict_series[TITLE][TAG_MODE]
|
||||
else: MODE = False
|
||||
|
||||
renumeration(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE, TITLE)
|
||||
|
||||
else:
|
||||
# se non è stata rinumerata controlla se è attiva la rinumerazione automatica
|
||||
if 'autorenumber' not in settings_node: return itemlist
|
||||
if 'autorenumber' not in settings_node:
|
||||
return itemlist
|
||||
if settings_node['autorenumber'] == True:
|
||||
config_item(item, itemlist, typography, True)
|
||||
config_item(item, itemlist, typography, True)
|
||||
|
||||
else:
|
||||
for item in itemlist:
|
||||
try:
|
||||
dict_series = jsontools.get_node_from_file(itemlist[0].channel, TAG_TVSHOW_RENUMERATE)
|
||||
TITLE = item.show.rstrip()
|
||||
TITLE = item.show.rstrip()
|
||||
if dict_series.has_key(TITLE) and dict_series[TITLE].has_key(TAG_ID):
|
||||
ID = dict_series[TITLE][TAG_ID]
|
||||
exist = True
|
||||
except:
|
||||
else:
|
||||
exist = False
|
||||
|
||||
if item.contentType != 'movie':
|
||||
if item.context:
|
||||
context2 = item.context
|
||||
@@ -238,7 +301,7 @@ def renumber(itemlist, item='', typography=''):
|
||||
item.context = context(exist)
|
||||
|
||||
def renumeration (itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE, TITLE):
|
||||
log('EPISODE= ', EPISODE)
|
||||
|
||||
# Se ID è 0 salta la rinumerazione
|
||||
if ID == '0':
|
||||
return itemlist
|
||||
@@ -256,7 +319,6 @@ def renumeration (itemlist, item, typography, dict_series, ID, SEASON, EPISODE,
|
||||
|
||||
elif EPISODE:
|
||||
EpisodeDict = json.loads(base64.b64decode(EPISODE))
|
||||
log('EPISODE DICT= ', EpisodeDict)
|
||||
|
||||
# Controlla che la lista egli Episodi sia della stessa lunghezza di Itemlist
|
||||
if EpisodeDict == 'none':
|
||||
@@ -274,35 +336,59 @@ def renumeration (itemlist, item, typography, dict_series, ID, SEASON, EPISODE,
|
||||
make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE, TITLE)
|
||||
|
||||
def make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE, TITLE):
|
||||
from core import support
|
||||
log()
|
||||
page = 1
|
||||
EpList = []
|
||||
if EPISODE:
|
||||
EpisodeDict = json.loads(base64.b64decode(EPISODE))
|
||||
else:
|
||||
EpisodeDict = {}
|
||||
exist = True
|
||||
item.infoLabels['tvdb_id'] = ID
|
||||
tvdb.set_infoLabels_item(item)
|
||||
FirstOfSeason= 0
|
||||
|
||||
if EPISODE: EpisodeDict = json.loads(base64.b64decode(EPISODE))
|
||||
else: EpisodeDict = {}
|
||||
try: SPECIAL = dict_series[TITLE][TAG_SPECIAL]
|
||||
except: SPECIAL = []
|
||||
try: EpList = json.loads(base64.b64decode(dict_series[TITLE][TAG_EPLIST]))
|
||||
except: EpList = []
|
||||
try: Pages = dict_series[TITLE][TAG_CHECK]
|
||||
except: Pages = [1]
|
||||
|
||||
# Ricava Informazioni da TVDB
|
||||
while exist:
|
||||
data = tvdb.otvdb_global.get_list_episodes(ID,page)
|
||||
if data: page = page + 1
|
||||
else: exist = False
|
||||
checkpages = []
|
||||
check = True
|
||||
Page = Pages[-1]
|
||||
|
||||
while exist:
|
||||
if check:
|
||||
for page in Pages:
|
||||
data = tvdb.otvdb_global.get_list_episodes(ID,page)
|
||||
for episodes in data['data']:
|
||||
if episodes['firstAired'] and [episodes['firstAired'], episodes['airedSeason'], episodes['airedEpisodeNumber']] not in EpList:
|
||||
EpList.append([episodes['firstAired'], episodes['airedSeason'], episodes['airedEpisodeNumber']])
|
||||
else:
|
||||
if page not in checkpages:
|
||||
checkpages.append(page)
|
||||
check = False
|
||||
|
||||
data = tvdb.otvdb_global.get_list_episodes(ID,Page)
|
||||
if data:
|
||||
Page = Page + 1
|
||||
for episodes in data['data']:
|
||||
if episodes['firstAired']: EpList.append([episodes['firstAired'], episodes['airedSeason'], episodes['airedEpisodeNumber']])
|
||||
EpList.sort()
|
||||
log(EpList)
|
||||
if episodes['firstAired'] and [episodes['firstAired'], episodes['airedSeason'], episodes['airedEpisodeNumber']] not in EpList:
|
||||
EpList.append([episodes['firstAired'], episodes['airedSeason'], episodes['airedEpisodeNumber']])
|
||||
else:
|
||||
if page not in checkpages:
|
||||
checkpages.append(Page -1)
|
||||
exist = False
|
||||
|
||||
EpList.sort()
|
||||
|
||||
dict_series[TITLE][TAG_CHECK] = checkpages
|
||||
EpList = base64.b64encode(json.dumps(EpList))
|
||||
dict_series[TITLE][TAG_EPLIST] = EpList
|
||||
jsontools.update_node(dict_series, item.channel, TAG_TVSHOW_RENUMERATE)[0]
|
||||
|
||||
# Crea Dizionari per la numerazione
|
||||
if EpList:
|
||||
EpList = json.loads(base64.b64decode(dict_series[TITLE][TAG_EPLIST]))
|
||||
specials = []
|
||||
regular = {}
|
||||
complete = {}
|
||||
@@ -310,7 +396,6 @@ def make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE
|
||||
ep = 1
|
||||
specialep = 0
|
||||
for episode in EpList:
|
||||
log('EPISODE= ', episode[1])
|
||||
complete[allep] = [str(episode[1]) + 'x' + str(episode[2]), episode[0]]
|
||||
if episode[1] == 0:
|
||||
specials.append(allep)
|
||||
@@ -327,20 +412,14 @@ def make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE
|
||||
FirstOfSeason = numbers - 1
|
||||
|
||||
if MODE == True: SPECIAL = specials
|
||||
log(SPECIAL)
|
||||
log(complete)
|
||||
log(regular)
|
||||
|
||||
addiction = 0
|
||||
for item in itemlist:
|
||||
# Otiene Numerazione Episodi
|
||||
if config.get_localized_string(30992) not in item.title:
|
||||
episode = int(scrapertoolsV2.find_single_match(item.title, r'\d+'))
|
||||
log('EPISODE= ',episode)
|
||||
number = episode + FirstOfSeason - addiction
|
||||
count = number + addiction
|
||||
# find = episode + FirstOfSeason
|
||||
# log('FIND= ',find, ' ',str(episode) + ' ' + str(FirstOfSeason))
|
||||
# Crea Dizionario Episodi
|
||||
|
||||
if episode == 0:
|
||||
|
||||
@@ -814,7 +814,7 @@ def save_download(item):
|
||||
del item.from_action
|
||||
del item.from_channel
|
||||
|
||||
item.contentChannel = item.fromchannel if item.fromchannel else item.channel
|
||||
item.contentChannel = item.from_channel if item.from_channel else item.channel
|
||||
item.contentAction = item.fromaction if item.fromaction else item.action
|
||||
|
||||
if item.contentType in ["tvshow", "episode", "season"]:
|
||||
|
||||
Reference in New Issue
Block a user