diff --git a/channels/altadefinizione01.json b/channels/altadefinizione01.json index 0596d45d..ed51566e 100644 --- a/channels/altadefinizione01.json +++ b/channels/altadefinizione01.json @@ -33,7 +33,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero di link da verificare", "default": 1, diff --git a/channels/altadefinizione01.py b/channels/altadefinizione01.py index d97eefd8..8fdd4a12 100644 --- a/channels/altadefinizione01.py +++ b/channels/altadefinizione01.py @@ -16,8 +16,8 @@ list_language = IDIOMAS.values() list_servers = ['openload', 'streamango', 'rapidvideo', 'streamcherry', 'megadrive'] list_quality = ['default'] -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'altadefinizione01') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'altadefinizione01') +checklinks = config.get_setting('checklinks', 'altadefinizione01') +checklinks_number = config.get_setting('checklinks_number', 'altadefinizione01') headers = [['Referer', host]] blacklist_categorie = ['Altadefinizione01', 'Altadefinizione.to'] @@ -147,8 +147,8 @@ def findvideos(item): itemlist = support.server(item, headers=headers) # Requerido para Filtrar enlaces - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para FilterTools # itemlist = filtertools.get_links(itemlist, item, list_language) diff --git a/channels/altadefinizione01_club.json b/channels/altadefinizione01_club.json index 19890b5b..7dc55b71 100644 --- a/channels/altadefinizione01_club.json +++ b/channels/altadefinizione01_club.json @@ -44,7 +44,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": true, @@ -52,7 +52,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/altadefinizione01_club.py b/channels/altadefinizione01_club.py index 4f0ebf42..3185eaa4 100644 --- a/channels/altadefinizione01_club.py +++ b/channels/altadefinizione01_club.py @@ -19,8 +19,8 @@ host = "https://www.altadefinizione01.vision/" #aggiornato al 30-04-209 # ======== Funzionalità ============================= -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__) -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__) +checklinks = config.get_setting('checklinks', __channel__) +checklinks_number = config.get_setting('checklinks_number', __channel__) headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'], ['Referer', host]] @@ -216,8 +216,8 @@ def findvideos(item): logger.error("data doesn't contain expected URL") # Controlla se i link sono validi - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para FilterTools itemlist = filtertools.get_links(itemlist, item, list_language) diff --git a/channels/altadefinizione01_link.json b/channels/altadefinizione01_link.json index 1f945ec8..47cb3ac3 100644 --- a/channels/altadefinizione01_link.json +++ b/channels/altadefinizione01_link.json @@ -4,25 +4,27 @@ "active": true, "adult": false, "language": ["ita"], - "fanart": "https://altadefinizione01.estate/templates/Dark/img/logo2.png", - "thumbnail": "https://altadefinizione01.estate/templates/Dark/img/logo2.png", - "banner": "https://altadefinizione01.estate/templates/Dark/img/logo2.png", + "fanart": "", + "thumbnail": "", + "banner": "http://altadefinizione01.link/templates/Dark/img/logonyy.png", + "fix" : "reimpostato url e modificato file per KOD", + "change_date": "2019-30-04", "categories": [ "movie" ], - "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "Includi in Ricerca Globale", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_newest_peliculas", + "settings": [ + { + "id": "modo_grafico", "type": "bool", - "label": "Includi in Novità - Film", + "label": "Cerca informazioni extra", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_film", + "type": "bool", + "label": "Includi in Novità", "default": true, "enabled": true, "visible": true @@ -34,6 +36,31 @@ "default": true, "enabled": true, "visible": true + }, + { + "id": "include_in_global_search", + "type": "bool", + "label": "Includi ricerca globale", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "checklinks", + "type": "bool", + "label": "Verifica se i link esistono", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "checklinks_number", + "type": "list", + "label": "Numero de link da verificare", + "default": 1, + "enabled": true, + "visible": "eq(-1,true)", + "lvalues": [ "5", "10", "15", "20" ] }, { "id": "filter_languages", @@ -43,8 +70,24 @@ "enabled": true, "visible": true, "lvalues": [ - "No filtrar", - "Italiano" + "Non filtrare", + "IT" + ] + }, + { + "id": "perfil", + "type": "list", + "label": "profilo dei colori", + "default": 0, + "enabled": true, + "visible": true, + "lvalues": [ + "Sin color", + "Perfil 5", + "Perfil 4", + "Perfil 3", + "Perfil 2", + "Perfil 1" ] } ] diff --git a/channels/altadefinizione01_link.py b/channels/altadefinizione01_link.py index bde381ee..7e690035 100644 --- a/channels/altadefinizione01_link.py +++ b/channels/altadefinizione01_link.py @@ -3,30 +3,14 @@ # -*- Creato per Alfa-addon -*- # -*- e adattato for KOD -*- # -*- By Greko -*- -# -*- last change: 23/05/2019 -""" -modificati: - core/servertools.py - core/support.py +# -*- last change: 04/05/2019 -problemi noti: - - non ordina le categorie - - titolo nella pagina server - - autoplay - - videoteca nella pagina dei server - -Questi "problemi" secondo me vanno risolti in altri file, non ho modificato ulteriori file -perchè non so se si vanno queste modifiche. -Che portano le seguenti : - 1. scheletro dei canali simile, se non uguale per tutti, cambiano naturalmente gli host e le regex - 2. con una modifica si cambiano tutti i canali - -""" - -from specials import autoplay -from core import support +from channelselector import get_thumb +from core import httptools, scrapertools, servertools, tmdb, support +from core.item import Item from platformcode import config, logger +from specials import autoplay, filtertools __channel__ = "altadefinizione01_link" @@ -34,15 +18,19 @@ __channel__ = "altadefinizione01_link" #host = "http://altadefinizione01.art/" # aggiornato al 22 marzo 2019 #host = "https://altadefinizione01.network/" #aggiornato al 22 marzo 2019 #host = "http://altadefinizione01.date/" #aggiornato al 3 maggio 2019 -#host = "https://altadefinizione01.voto/" #aggiornato al 3 maggio 2019 -host = "https://altadefinizione01.estate/" # aggiornato al 23 maggio 2019 +host = "https://altadefinizione01.voto/" #aggiornato al 3 maggio 2019 # ======== def per utility INIZIO ============================ + +checklinks = config.get_setting('checklinks', __channel__) +checklinks_number = config.get_setting('checklinks_number', __channel__) +headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'], + ['Referer', host]]#,['Accept-Language','it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3']] -headers = [['Referer', host]] - -list_servers = ['supervideo', 'streamcherry','rapidvideo', 'streamango', 'openload'] +IDIOMAS = {'Italiano': 'IT'} +list_language = IDIOMAS.values() +list_servers = ['openload', 'streamcherry','rapidvideo', 'streamango', 'supervideo'] list_quality = ['default'] # =========== home menu =================== @@ -53,79 +41,164 @@ def mainlist(item): :param item: :return: itemlist [] """ - support.log() + logger.info("%s mainlist log: %s" % (__channel__, item)) itemlist = [] + autoplay.init(item.channel, list_servers, list_quality) # Menu Principale - support.menu(itemlist, 'Novità bold', 'peliculas', host) - support.menu(itemlist, 'Film per Genere', 'genres', host, args='genres') - support.menu(itemlist, 'Film per Anno submenu', 'genres', host, args='years') - support.menu(itemlist, 'Film per Qualità submenu', 'genres', host, args='quality') + support.menu(itemlist, 'Film Ultimi Arrivi bold', 'peliculas', host)#, args='film') + support.menu(itemlist, 'Genere', 'categorie', host, args=['','genres']) + support.menu(itemlist, 'Per anno submenu', 'categorie', host, args=['Film per Anno','years']) + support.menu(itemlist, 'Per qualità submenu', 'categorie', host, args=['Film per qualità','quality']) support.menu(itemlist, 'Al Cinema bold', 'peliculas', host+'film-del-cinema') - support.menu(itemlist, 'Popolari bold', 'peliculas', host+'piu-visti.html') - support.menu(itemlist, 'Mi sento fortunato bold', 'genres', host, args='lucky') + support.menu(itemlist, 'Popolari bold', 'categorie', host+'piu-visti.html', args=['popular','']) + support.menu(itemlist, 'Mi sento fortunato bold', 'categorie', host, args=['fortunato','lucky']) support.menu(itemlist, 'Sub-ITA bold', 'peliculas', host+'film-sub-ita/') support.menu(itemlist, 'Cerca film submenu', 'search', host) - # per autoplay - autoplay.init(item.channel, list_servers, list_quality) autoplay.show_option(item.channel, itemlist) return itemlist -# ======== def in ordine di action dal menu =========================== +# ======== def in ordine di menu =========================== def peliculas(item): - support.log + logger.info("%s mainlist peliculas log: %s" % (__channel__, item)) itemlist = [] + # scarico la pagina + data = httptools.downloadpage(item.url, headers=headers).data + # da qui fare le opportuni modifiche + patron = 'class="innerImage">.*?href="([^"]+)".*?src="([^"]+)".*?'\ + 'class="ml-item-title">([^"]+)'\ + '(.*?)<.*?class="ml-item-label">.*?class="ml-item-label">(.*?).*?href="([^"]+)".*?src="([^"]+)"'\ - '.*?class="ml-item-title">([^"]+)(.*?)'\ - '<.*?class="ml-item-label">.*?class="ml-item-label ml-item-label-.*?">'\ - '(.*?).*?class="ml-item-label">(.*?)\d ' - - itemlist = support.scrape(item, patron=patron, listGroups=listGroups, - headers= headers, patronNext=patronNext, - action='findvideos') - + # poichè il sito ha l'anno del film con TMDB la ricerca titolo-anno è esatta quindi inutile fare lo scrap delle locandine + # e della trama dal sito che a volte toppano + tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) + + # Paginazione + support.nextPage(itemlist,item,data,'\d ') + return itemlist # =========== def pagina categorie ====================================== -def genres(item): - support.log +def categorie(item): + logger.info("%s mainlist categorie log: %s" % (__channel__, item)) itemlist = [] - #data = httptools.downloadpage(item.url, headers=headers).data - action = 'peliculas' - if item.args == 'genres': - bloque = r'' - elif item.args == 'years': - bloque = r'' - elif item.args == 'quality': - bloque = r'' - elif item.args == 'lucky': # sono i titoli random nella pagina, cambiano 1 volta al dì - bloque = r'FILM RANDOM.*?class="listSubCat">(.*?)' - action = 'findvideos' - - patron = r'
  • (.*?)<' + # scarico la pagina + data = httptools.downloadpage(item.url, headers=headers).data - listGroups = ['url','title'] - itemlist = support.scrape(item, patron=patron, listGroups=listGroups, - headers= headers, patron_block = bloque, - action=action) + # da qui fare le opportuni modifiche + if item.args[1] == 'genres': + bloque = scrapertools.find_single_match(data, '') + elif item.args[1] == 'years': + bloque = scrapertools.find_single_match(data, '') + elif item.args[1] == 'quality': + bloque = scrapertools.find_single_match(data, '') + elif item.args[1] == 'lucky': # sono i titoli random nella pagina, alcuni rimandano solo a server a pagamento + bloque = scrapertools.find_single_match(data, 'FILM RANDOM.*?class="listSubCat">(.*?)') + patron = '
  • (.*?)<' + matches = scrapertools.find_multiple_matches(bloque, patron) + + if item.args[1] == 'lucky': + bloque = scrapertools.find_single_match(data, 'FILM RANDOM.*?class="listSubCat">(.*?)') + patron = '
  • (.*?)<' + matches = scrapertools.find_multiple_matches(bloque, patron) + + for scrapurl, scraptitle in sorted(matches): + if item.args[1] != 'lucky': + url = host+scrapurl + action="peliculas" + else: + url = scrapurl + action = "findvideos_film" + itemlist.append(Item( + channel=item.channel, + action=action, + title = scraptitle, + url=url, + thumbnail=get_thumb(scraptitle, auto = True), + Folder = True, + )) + + return itemlist + + +# =========== def pagina del film con i server per verderlo ============= +# da sistemare che ne da solo 1 come risultato + +def findvideos(item): + logger.info("%s mainlist findvideos_film log: %s" % (__channel__, item)) + itemlist = [] + # scarico la pagina + #data = scrapertools.cache_page(item.url) #non funziona più? + data = httptools.downloadpage(item.url, headers=headers).data + # da qui fare le opportuni modifiche + patron = '' + matches = scrapertools.find_multiple_matches(data, patron) + #logger.info("altadefinizione01_linkMATCHES: %s " % matches) + for scrapedurl in matches: + + try: + itemlist = servertools.find_video_items(data=data) + + for videoitem in itemlist: + logger.info("Videoitemlist2: %s" % videoitem) + videoitem.title = "%s [%s]" % (item.contentTitle, videoitem.title)#"[%s] %s" % (videoitem.server, item.title) #"[%s]" % (videoitem.title) + videoitem.show = item.show + videoitem.contentTitle = item.contentTitle + videoitem.contentType = item.contentType + videoitem.channel = item.channel + videoitem.year = item.infoLabels['year'] + videoitem.infoLabels['plot'] = item.infoLabels['plot'] + except AttributeError: + logger.error("data doesn't contain expected URL") + + # Controlla se i link sono validi + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) + + # Requerido para FilterTools + itemlist = filtertools.get_links(itemlist, item, list_language) + + # Requerido para AutoPlay + autoplay.start(itemlist, item) + + # Aggiunge alla videoteca + if item.extra != 'findvideos' and item.extra != "library" and config.get_videolibrary_support() and len(itemlist) != 0 : + support.videolibrary(itemlist, item) return itemlist # =========== def per cercare film/serietv ============= #host+/index.php?do=search&story=avatar&subaction=search def search(item, text): - support.log(categoria) + logger.info("%s mainlist search log: %s %s" % (__channel__, item, text)) itemlist = [] text = text.replace(" ", "+") item.url = host+"/index.php?do=search&story=%s&subaction=search" % (text) + #item.extra = "search" try: return peliculas(item) # Se captura la excepciÛn, para no interrumpir al buscador global si un canal falla @@ -138,18 +211,20 @@ def search(item, text): # =========== def per le novità nel menu principale ============= def newest(categoria): - support.log(categoria) + logger.info("%s mainlist search log: %s" % (__channel__, categoria)) itemlist = [] item = Item() + #item.extra = 'film' try: - if categoria == "peliculas": + if categoria == "film": item.url = host item.action = "peliculas" itemlist = peliculas(item) if itemlist[-1].action == "peliculas": itemlist.pop() - # Continua la ricerca in caso di errore + + # Continua la ricerca in caso di errore except: import sys for line in sys.exc_info(): diff --git a/channels/altadefinizioneclick.json b/channels/altadefinizioneclick.json index 05339015..bacbb3c0 100644 --- a/channels/altadefinizioneclick.json +++ b/channels/altadefinizioneclick.json @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -49,7 +49,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/altadefinizioneclick.py b/channels/altadefinizioneclick.py index 3037f154..b4f3858a 100644 --- a/channels/altadefinizioneclick.py +++ b/channels/altadefinizioneclick.py @@ -17,8 +17,8 @@ list_language = IDIOMAS.values() list_servers = ['verystream', 'openload', 'streamango', "vidoza", "thevideo", "okru", 'youtube'] list_quality = ['1080p'] -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'altadefinizioneclick') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'altadefinizioneclick') +checklinks = config.get_setting('checklinks', 'altadefinizioneclick') +checklinks_number = config.get_setting('checklinks_number', 'altadefinizioneclick') headers = [['Referer', host]] @@ -98,8 +98,8 @@ def findvideos(item): itemlist = support.hdpass_get_servers(item) - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # itemlist = filtertools.get_links(itemlist, item, list_language) diff --git a/channels/altadefinizionehd.json b/channels/altadefinizionehd.json index b410f36c..3efdad33 100644 --- a/channels/altadefinizionehd.json +++ b/channels/altadefinizionehd.json @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -49,7 +49,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/animeleggendari.json b/channels/animeleggendari.json index 2306345e..ac5a6b52 100644 --- a/channels/animeleggendari.json +++ b/channels/animeleggendari.json @@ -33,7 +33,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/animeleggendari.py b/channels/animeleggendari.py index 285f3393..8ac1b391 100644 --- a/channels/animeleggendari.py +++ b/channels/animeleggendari.py @@ -20,8 +20,8 @@ list_language = IDIOMAS.values() list_servers = ['verystream', 'openload', 'streamango'] list_quality = ['default'] -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'animeleggendari') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'animeleggendari') +checklinks = config.get_setting('checklinks', 'animeleggendari') +checklinks_number = config.get_setting('checklinks_number', 'animeleggendari') def mainlist(item): log() @@ -176,8 +176,8 @@ def findvideos(item): itemlist = support.server(item,data) - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # itemlist = filtertools.get_links(itemlist, item, list_language) autoplay.start(itemlist, item) diff --git a/channels/animesaturn.json b/channels/animesaturn.json index 627d4fe0..3bd40f70 100644 --- a/channels/animesaturn.json +++ b/channels/animesaturn.json @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -49,7 +49,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/animesaturn.py b/channels/animesaturn.py index 7f88cef5..560ecedc 100644 --- a/channels/animesaturn.py +++ b/channels/animesaturn.py @@ -8,10 +8,10 @@ import re import urlparse import channelselector -from core import httptools, tmdb, scrapertools, support +from core import httptools, tmdb, support, scrapertools, jsontools from core.item import Item from platformcode import logger, config -from specials import autoplay +from specials import autoplay, autorenumber __channel__ = "animesaturn" host = config.get_setting("channel_host", __channel__) @@ -22,45 +22,14 @@ list_language = IDIOMAS.values() list_servers = ['openload','fembed'] list_quality = ['default'] -# __comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__) -# __comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__) - def mainlist(item): support.log(item.channel + 'mainlist') itemlist = [] - support.menu(itemlist, 'Anime bold', 'lista_anime', "%s/animelist?load_all=1" % host,'anime') - itemlist.append( - Item(channel=item.channel, - action="ultimiep", - url="%s/fetch_pages.php?request=episodios" % host, - title=support.typo("Novità submenu"), - extra="", - contentType='anime', - folder=True, - thumbnail=support.thumb()) - ) - # itemlist.append( - # Item(channel=item.channel, - # action="lista_anime", - # url="%s/animeincorso" % host, - # title=support.typo("In corso submenu"), - # extra="anime", - # contentType='anime', - # folder=True, - # thumbnail=channelselector.get_thumb('on_the_air.png')) - # ) - itemlist.append( - Item(channel=item.channel, - action="list_az", - url="%s/animelist?load_all=1" % host, - title=support.typo("Archivio A-Z submenu"), - extra="anime", - contentType='anime', - folder=True, - thumbnail=channelselector.get_thumb('channels_tvshow_az.png')) - ) - support.menu(itemlist, 'Cerca', 'search', host,'anime') + support.menu(itemlist, 'Anime bold', 'lista_anime', "%s/animelist?load_all=1" % host) + support.menu(itemlist, 'Novità submenu', 'ultimiep', "%s/fetch_pages.php?request=episodes" % host,'tvshow') + support.menu(itemlist, 'Archivio A-Z submenu', 'list_az', '%s/animelist?load_all=1' % host,args=['tvshow','alfabetico']) + support.menu(itemlist, 'Cerca', 'search', host) autoplay.init(item.channel, list_servers, list_quality) @@ -131,9 +100,14 @@ def lista_anime(item): title += ' '+support.typo(' (ITA)') infoLabels = {} - # if 'Akira' in title: - # movie = True - # infoLabels['year']= 1988 + if 'Akira' in title: + movie = True + infoLabels['year']= 1988 + + if 'Dragon Ball Super Movie' in title: + movie = True + infoLabels['year'] = 2019 + itemlist.append( Item(channel=item.channel, @@ -213,7 +187,7 @@ def episodios(item): fanart=item.thumbnail, thumbnail=item.thumbnail)) - if((len(itemlist) == 1 and 'Movie' in itemlist[0].title) or movie): + if(((len(itemlist) == 1 and 'Movie' in itemlist[0].title) or movie) and item.contentType!='movie'): item.url = itemlist[0].url item.contentType = 'movie' return findvideos(item) @@ -235,6 +209,7 @@ def findvideos(item): if(item.contentType == 'movie'): episodes = episodios(item) + if(len(episodes)>0): item.url = episodes[0].url @@ -245,26 +220,14 @@ def findvideos(item): url = scrapertools.find_single_match(data, patron) data = httptools.downloadpage(url).data - # patron = r"""""" - # matches = re.compile(patron, re.DOTALL).findall(data) - # for video in matches: - # itemlist.append( - # Item( - # channel=item.channel, - # action="play", - # fulltitle=item.fulltitle, - # title="".join([item.title, ' ', support.typo(video.title, 'color kod []')]), - # url=video, - # contentType=item.contentType, - # folder=False)) itemlist = support.server(item, data=data) - # itemlist = filtertools.get_links(itemlist, item, list_language) - + if item.contentType == 'movie': + support.videolibrary(itemlist, item, 'color kod') # Controlla se i link sono validi - # if __comprueba_enlaces__: - # itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + # if checklinks: + # itemlist = servertools.check_list_links(itemlist, checklinks_number) # # autoplay.start(itemlist, item) @@ -279,16 +242,13 @@ def ultimiep(item): logger.info(item.channel + "ultimiep") itemlist = [] - post = "page=%s" % item.extra if item.extra else None - logger.debug(post) - logger.debug(item.url) + post = "page=%s" % item.args['page'] if item.args and item.args['page'] else None + data = httptools.downloadpage( item.url, post=post, headers={ 'X-Requested-With': 'XMLHttpRequest' }).data - logger.debug(data) - patron = r"""
    [^
    \s*""" patron += r"""
    (.+?)
    \s*""" patron += r"""
    (.+?)
    """ @@ -298,6 +258,7 @@ def ultimiep(item): scrapedtitle1 = cleantitle(scrapedtitle1) scrapedtitle2 = cleantitle(scrapedtitle2) scrapedtitle = scrapedtitle1 + ' - ' + scrapedtitle2 + '' + itemlist.append( Item(channel=item.channel, contentType="tvshow", @@ -313,16 +274,15 @@ def ultimiep(item): # Pagine patronvideos = r'data-page="(\d+)" title="Next">Pagina Successiva' next_page = scrapertools.find_single_match(data, patronvideos) - if next_page: itemlist.append( Item( channel=item.channel, action="ultimiep", title=support.typo(config.get_localized_string(30992), 'color kod bold'), - url=host + "/fetch_pages?request=episodios", + url=item.url, thumbnail= support.thumb(), - extra=next_page, + args={'page':next_page}, folder=True)) return itemlist @@ -362,42 +322,73 @@ def newest(categoria): # ================================================================================================================ # ---------------------------------------------------------------------------------------------------------------- -def search_anime(item): - logger.info(item.channel + " search_anime") +def search_anime(item, texto): + logger.info(item.channel + " search_anime: "+texto) itemlist = [] - data = httptools.downloadpage(host + "/animelist?load_all=1").data - data = scrapertools.decodeHtmlentities(data) + # data = httptools.downloadpage(host + "/animelist?load_all=1").data + # data = scrapertools.decodeHtmlentities(data) + # + # texto = texto.lower().split('+') + # + # patron = r']*?>[^>]*?>(.+?)<' + # matches = re.compile(patron, re.DOTALL).findall(data) + # + # for scrapedurl, scrapedtitle in [(scrapedurl, scrapedtitle) + # for scrapedurl, scrapedtitle in matches + # if all(t in scrapedtitle.lower() + # for t in texto)]: + # + # title = cleantitle(scrapedtitle).replace('(ita)','(ITA)') + # showtitle = title + # if '(ITA)' in title: + # title = title.replace('(ITA)','').strip() + # showtitle = title + # title += ' '+support.typo(' [ITA] color kod') + # + # itemlist.append( + # Item( + # channel=item.channel, + # contentType="episode", + # action="episodios", + # title=title, + # url=scrapedurl, + # fulltitle=title, + # show=showtitle, + # thumbnail="")) + # + # tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - texto = item.url.lower().split('+') + data = httptools.downloadpage(host + "/index.php?search=1&key=%s" % texto).data + jsondata = jsontools.load(data) - patron = r']*?>[^>]*?>(.+?)<' - matches = re.compile(patron, re.DOTALL).findall(data) + for title in jsondata: + data = str(httptools.downloadpage("%s/templates/header?check=1" % host, post="typeahead=%s" % title).data) - for scrapedurl, scrapedtitle in [(scrapedurl, scrapedtitle) - for scrapedurl, scrapedtitle in matches - if all(t in scrapedtitle.lower() - for t in texto)]: - - title = cleantitle(scrapedtitle).replace('(ita)','(ITA)') - showtitle = title - if '(ITA)' in title: - title = title.replace('(ITA)','').strip() + if 'Anime non esistente' in data: + continue + else: + title = title.replace('(ita)','(ITA)') showtitle = title - title += ' '+support.typo(' [ITA] color kod') + if '(ITA)' in title: + title = title.replace('(ITA)', '').strip() + showtitle = title + title += ' ' + support.typo(' (ITA)') - itemlist.append( - Item( - channel=item.channel, - contentType="episode", - action="episodios", - title=title, - url=scrapedurl, - fulltitle=title, - show=showtitle, - thumbnail="")) + url = "%s/anime/%s" % (host, data) + logger.debug(title) + logger.debug(url) - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) + itemlist.append( + Item( + channel=item.channel, + contentType="episode", + action="episodios", + title=title, + url=url, + fulltitle=title, + show=showtitle, + thumbnail="")) return itemlist @@ -408,10 +399,9 @@ def search_anime(item): def search(item, texto): logger.info(item.channel + " search") itemlist = [] - item.url = texto try: - return search_anime(item) + return search_anime(item, texto) except: import sys diff --git a/channels/animespace.json b/channels/animespace.json index fc66d0bd..4a7f4084 100644 --- a/channels/animespace.json +++ b/channels/animespace.json @@ -32,7 +32,7 @@ ] }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Número de enlaces a verificar", "default": 1, diff --git a/channels/animespace.py b/channels/animespace.py index 7634a5fd..aa910a86 100644 --- a/channels/animespace.py +++ b/channels/animespace.py @@ -17,8 +17,8 @@ from specials import renumbertools host = "https://animespace.tv/" -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'animespace') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'animespace') +checklinks = config.get_setting('checklinks', 'animespace') +checklinks_number = config.get_setting('checklinks_number', 'animespace') IDIOMAS = {'VOSE': 'VOSE'} list_language = IDIOMAS.values() @@ -240,8 +240,8 @@ def findvideos(item): itemlist = servertools.get_servers_itemlist(itemlist, lambda x: x.title % x.server.capitalize()) - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para FilterTools diff --git a/channels/animeworld.json b/channels/animeworld.json index 3293a0bb..dfcee138 100644 --- a/channels/animeworld.json +++ b/channels/animeworld.json @@ -32,7 +32,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -40,7 +40,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/animeworld.py b/channels/animeworld.py index ff56efef..4a1586be 100644 --- a/channels/animeworld.py +++ b/channels/animeworld.py @@ -20,8 +20,8 @@ list_language = IDIOMAS.values() list_servers = ['diretto'] list_quality = [] -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'animeworld') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'animeworld') +checklinks = config.get_setting('checklinks', 'animeworld') +checklinks_number = config.get_setting('checklinks_number', 'animeworld') def mainlist(item): @@ -398,8 +398,8 @@ def findvideos(item): # Requerido para Filtrar enlaces - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para FilterTools diff --git a/channels/casacinema.json b/channels/casacinema.json index dc407caf..c964ad15 100644 --- a/channels/casacinema.json +++ b/channels/casacinema.json @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -49,7 +49,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/casacinemaInfo.py b/channels/casacinemaInfo.py index a371b392..c9c969ed 100644 --- a/channels/casacinemaInfo.py +++ b/channels/casacinemaInfo.py @@ -15,8 +15,8 @@ list_language = IDIOMAS.values() list_servers = ['verystream', 'openload', 'wstream', 'speedvideo'] list_quality = ['1080p', '720', '480p', '360p'] -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'casacinema') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'casacinema') +checklinks = config.get_setting('checklinks', 'casacinema') +checklinks_number = config.get_setting('checklinks_number', 'casacinema') def mainlist(item): @@ -142,8 +142,8 @@ def findvideos(item): # Requerido para Filtrar enlaces - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para AutoPlay diff --git a/channels/cineblog01.json b/channels/cineblog01.json index c4b1c672..b2110524 100644 --- a/channels/cineblog01.json +++ b/channels/cineblog01.json @@ -33,7 +33,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero di link da verificare", "default": 1, diff --git a/channels/cineblog01.py b/channels/cineblog01.py index 8000c555..a2cb2401 100644 --- a/channels/cineblog01.py +++ b/channels/cineblog01.py @@ -27,8 +27,8 @@ list_language = IDIOMAS.values() list_servers = ['verystream', 'openload', 'streamango', 'wstream'] list_quality = ['HD', 'default'] -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'cineblog01') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'cineblog01') +checklinks = config.get_setting('checklinks', 'cineblog01') +checklinks_number = config.get_setting('checklinks_number', 'cineblog01') # esclusione degli articoli 'di servizio' blacklist = ['BENVENUTI', 'Richieste Serie TV', 'CB01.UNO ▶ TROVA L’INDIRIZZO UFFICIALE ', @@ -105,6 +105,7 @@ def newest(categoria): findhost() itemlist = [] item = Item() + item.contentType = 'movie' item.url = host + '/lista-film-ultimi-100-film-aggiunti/' return support.scrape(item, r']+)>([^<([]+)(?:\[([A-Z]+)\])?\s\(([0-9]{4})\)<\/a>', ['url', 'title', 'quality', 'year'], @@ -280,8 +281,8 @@ def findvideos(item): # Requerido para Filtrar enlaces - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para FilterTools diff --git a/channels/cinemalibero.json b/channels/cinemalibero.json index d55e578d..18dfce52 100644 --- a/channels/cinemalibero.json +++ b/channels/cinemalibero.json @@ -49,7 +49,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -57,7 +57,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/cinemalibero.py b/channels/cinemalibero.py index 1b0c0670..2709560f 100644 --- a/channels/cinemalibero.py +++ b/channels/cinemalibero.py @@ -19,8 +19,8 @@ list_servers = ['akstream', 'wstream', 'openload', 'streamango'] list_quality = ['default'] # Necessario per Verifica Link -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'cinemalibero') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'cinemalibero') +checklinks = config.get_setting('checklinks', 'cinemalibero') +checklinks_number = config.get_setting('checklinks_number', 'cinemalibero') host = 'https://www.cinemalibero.icu' @@ -219,8 +219,8 @@ def findvideos(item): # Questa def. deve sempre essere nominata findvideos action='add_pelicula_to_library', extra='findservers', contentTitle=item.contentTitle)) # Necessario per filtrare i Link - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # Necessario per FilterTools # itemlist = filtertools.get_links(itemlist, item, list_language) diff --git a/channels/cinemastreaming.json b/channels/cinemastreaming.json index d229b77b..261f294b 100644 --- a/channels/cinemastreaming.json +++ b/channels/cinemastreaming.json @@ -42,7 +42,7 @@ }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -50,7 +50,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/eurostreaming.json b/channels/eurostreaming.json index c196f11a..07ad271e 100644 --- a/channels/eurostreaming.json +++ b/channels/eurostreaming.json @@ -16,6 +16,14 @@ "enabled": true, "visible": true }, + { + "id": "modo_grafico", + "type": "bool", + "label": "Cerca informazioni extra", + "default": true, + "enabled": true, + "visible": true + }, { "id": "include_in_newest_series", "type": "bool", @@ -31,6 +39,23 @@ "default": true, "enabled": true, "visible": true + }, + { + "id": "checklinks", + "type": "bool", + "label": "Verifica se i link esistono", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "checklinks_number", + "type": "list", + "label": "Numero de link da verificare", + "default": 1, + "enabled": true, + "visible": "eq(-1,true)", + "lvalues": [ "5", "10", "15", "20" ] }, { "id": "filter_languages", @@ -45,5 +70,21 @@ "vosi" ] }, + { + "id": "perfil", + "type": "list", + "label": "profilo dei colori", + "default": 0, + "enabled": true, + "visible": true, + "lvalues": [ + "Sin color", + "Perfil 5", + "Perfil 4", + "Perfil 3", + "Perfil 2", + "Perfil 1" + ] + } ] } diff --git a/channels/eurostreaming.py b/channels/eurostreaming.py index d2687933..3197c73a 100644 --- a/channels/eurostreaming.py +++ b/channels/eurostreaming.py @@ -30,8 +30,8 @@ list_language = IDIOMAS.values() list_servers = ['verystream', 'wstream', 'speedvideo', 'flashx', 'nowvideo', 'streamango', 'deltabit', 'openload'] list_quality = ['default'] -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'eurostreaming') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'eurostreaming') +checklinks = config.get_setting('checklinks', 'eurostreaming') +checklinks_number = config.get_setting('checklinks_number', 'eurostreaming') def mainlist(item): support.log() diff --git a/channels/fastsubita.json b/channels/fastsubita.json index a18c5eeb..2db8f206 100644 --- a/channels/fastsubita.json +++ b/channels/fastsubita.json @@ -4,8 +4,8 @@ "language": ["ita"], "active": true, "adult": false, - "thumbnail": "http://fastsubita.com/wp-content/uploads/2017/10/Untitled-222255xxx.jpg", - "banner": "http://fastsubita.com/wp-content/uploads/2017/10/Untitled-222255xxx.jpg", + "thumbnail": "fastsubita.png", + "banner": "fastsubita.png", "categories": ["tvshow", "vosi"], "settings": [ { @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -49,7 +49,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/fastsubita.py b/channels/fastsubita.py index f2bba2a5..c8f575f7 100644 --- a/channels/fastsubita.py +++ b/channels/fastsubita.py @@ -6,7 +6,8 @@ import re -from core import scrapertools, httptools, tmdb +import channelselector +from core import scrapertools, httptools, tmdb, support from core.item import Item from platformcode import config, logger from specials import autoplay @@ -18,8 +19,8 @@ list_language = IDIOMAS.values() list_servers = ['verystream', 'openload', 'speedvideo', 'wstream', 'flashx', 'vidoza', 'vidtome'] list_quality = ['default'] -# __comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'fastsubita') -# __comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'fastsubita') +# checklinks = config.get_setting('checklinks', 'fastsubita') +# checklinks_number = config.get_setting('checklinks_number', 'fastsubita') headers = [ ['Host', 'fastsubita.com'], @@ -44,8 +45,8 @@ def mainlist(item): support.menu(itemlist, 'Serie TV bold', 'lista_serie', host,'tvshow') support.menu(itemlist, 'Novità submenu', 'pelicuals_tv', host,'tvshow') support.menu(itemlist, 'Archivio A-Z submenu', 'list_az', host,'tvshow',args=['serie']) - support.menu(itemlist, 'Cerca', 'search', host,'tvshow') + autoplay.init(item.channel, list_servers, list_quality) autoplay.show_option(item.channel, itemlist) @@ -113,24 +114,31 @@ def pelicuals_tv(item): episode = scrapertools.find_multiple_matches(scrapedtitle, r'((\d*)x(\d*))')[0] scrapedtitle = scrapedtitle.replace(scraped_1, "") + infoLabels = {} + infoLabels['season'] = episode[1] + infoLabels['episode'] = episode[2] if "http:" in scrapedurl: scrapedurl = scrapedurl else: scrapedurl = "http:" + scrapedurl + title = scraped_1+" - "+infoLabels['season']+"x"+infoLabels['episode']+" Sub-ITA" + itemlist.append( Item(channel=item.channel, action="findvideos", contentTpye="tvshow", - title=scraped_1 + " " + scrapedtitle, - fulltitle=scraped_1 + " " + scrapedtitle, + title=title, + fulltitle=title, url=scrapedurl, thumbnail=scrapedthumbnail, plot=scrapedplot, show=scraped_1, extra=item.extra, - contentSerieName=scraped_1+" ("+episode[0]+" Sub-Ita)", + contentSerieName=scraped_1, + contentLanguage='Sub-ITA', + infoLabels=infoLabels, folder=True)) tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) @@ -277,8 +285,8 @@ def findvideos(item): # # # Requerido para Filtrar enlaces # - # if __comprueba_enlaces__: - # itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + # if checklinks: + # itemlist = servertools.check_list_links(itemlist, checklinks_number) # # # Requerido para FilterTools # @@ -380,7 +388,7 @@ def episodios(item,itemlist = []): infoLabels = {} infoLabels['season'] = season infoLabels['episode'] = episode[2] - title = infoLabels['season']+'x'+infoLabels['episode'] + title = infoLabels['season']+'x'+infoLabels['episode']+" Sub-ITA" if "http:" not in scrapedurl: scrapedurl = "http:" + scrapedurl diff --git a/channels/filmigratis.json b/channels/filmigratis.json index 53f6e70f..b6f56db2 100644 --- a/channels/filmigratis.json +++ b/channels/filmigratis.json @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -49,7 +49,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/filmigratis.py b/channels/filmigratis.py index 1a1a28b3..a7bc6a09 100644 --- a/channels/filmigratis.py +++ b/channels/filmigratis.py @@ -18,8 +18,8 @@ list_language = IDIOMAS.values() list_servers = ['openload', 'streamango', 'vidoza', 'okru'] list_quality = ['1080p', '720p', '480p', '360'] -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'filmigratis') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'filmigratis') +checklinks = config.get_setting('checklinks', 'filmigratis') +checklinks_number = config.get_setting('checklinks_number', 'filmigratis') headers = [['Referer', host]] diff --git a/channels/filmsenzalimiti.json b/channels/filmsenzalimiti.json index 698e2f2a..db57b0c2 100644 --- a/channels/filmsenzalimiti.json +++ b/channels/filmsenzalimiti.json @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -49,7 +49,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/filmsenzalimiti.py b/channels/filmsenzalimiti.py index de62f0c4..5723a1cd 100644 --- a/channels/filmsenzalimiti.py +++ b/channels/filmsenzalimiti.py @@ -19,8 +19,8 @@ list_language = IDIOMAS.values() list_servers = ['verystream', 'openload', 'streamango', 'vidoza', 'okru'] list_quality = ['1080p', '720p', '480p', '360'] -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'filmsenzalimiti') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'filmsenzalimiti') +checklinks = config.get_setting('checklinks', 'filmsenzalimiti') +checklinks_number = config.get_setting('checklinks_number', 'filmsenzalimiti') headers = [['Referer', host]] @@ -174,8 +174,8 @@ def findvideos(item): action="add_pelicula_to_library", extra="findservers", contentTitle=item.contentTitle)) #Necessario per filtrare i Link - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # Necessario per FilterTools # itemlist = filtertools.get_links(itemlist, item, list_language) diff --git a/channels/filmsenzalimiticc.json b/channels/filmsenzalimiticc.json index 2bbe1ec3..81f21615 100644 --- a/channels/filmsenzalimiticc.json +++ b/channels/filmsenzalimiticc.json @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -49,7 +49,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/filmsenzalimiticc.py b/channels/filmsenzalimiticc.py index 7db3b9b5..e4029d77 100644 --- a/channels/filmsenzalimiticc.py +++ b/channels/filmsenzalimiticc.py @@ -22,8 +22,8 @@ list_servers = ['verystream', 'openload', 'vidlox', 'youtube'] list_quality = ['default'] # Necessario per Verifica Link -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'filmsenzalimiticc') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'filmsenzalimiticc') +checklinks = config.get_setting('checklinks', 'filmsenzalimiticc') +checklinks_number = config.get_setting('checklinks_number', 'filmsenzalimiticc') host = 'https://filmsenzalimiti.pw' @@ -239,8 +239,8 @@ def findvideos(item): # Questa def. deve sempre essere nominata findvideos action='add_pelicula_to_library', extra='findservers', contentTitle=item.contentTitle)) # Necessario per filtrare i Link - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # Necessario per FilterTools # itemlist = filtertools.get_links(itemlist, item, list_language) diff --git a/channels/ilgeniodellostreaming.json b/channels/ilgeniodellostreaming.json index 1d1afbcc..d9a6cbaf 100644 --- a/channels/ilgeniodellostreaming.json +++ b/channels/ilgeniodellostreaming.json @@ -49,7 +49,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -57,7 +57,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/ilgeniodellostreaming.py b/channels/ilgeniodellostreaming.py index a88dafe4..92b4aff1 100644 --- a/channels/ilgeniodellostreaming.py +++ b/channels/ilgeniodellostreaming.py @@ -22,8 +22,8 @@ list_servers = ['verystream', 'openload', 'streamango', 'youtube'] list_quality = ['default'] -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'ilgeniodellostreaming') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'ilgeniodellostreaming') +checklinks = config.get_setting('checklinks', 'ilgeniodellostreaming') +checklinks_number = config.get_setting('checklinks_number', 'ilgeniodellostreaming') headers = [['Referer', host]] @@ -372,8 +372,8 @@ def findvideos(item): # Requerido para Filtrar enlaces - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para FilterTools diff --git a/channels/italiafilmhd.json b/channels/italiafilmhd.json index cfae73d3..f64aa115 100644 --- a/channels/italiafilmhd.json +++ b/channels/italiafilmhd.json @@ -34,7 +34,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -42,7 +42,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero di link da verificare", "default": 1, diff --git a/channels/italiafilmhd.py b/channels/italiafilmhd.py index 9ab4a0ab..0aeeb189 100644 --- a/channels/italiafilmhd.py +++ b/channels/italiafilmhd.py @@ -17,8 +17,8 @@ list_language = IDIOMAS.values() list_servers = ['verystream', 'openload', 'youtube'] list_quality = ['default'] -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'italiafilmhd') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'italiafilmhd') +checklinks = config.get_setting('checklinks', 'italiafilmhd') +checklinks_number = config.get_setting('checklinks_number', 'italiafilmhd') host = "https://italiafilm.network" @@ -296,8 +296,8 @@ def findvideos(item): # Requerido para Filtrar enlaces - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para FilterTools diff --git a/channels/mondoserietv.json b/channels/mondoserietv.json index 74a150ed..cae7032d 100644 --- a/channels/mondoserietv.json +++ b/channels/mondoserietv.json @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -49,7 +49,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/mondoserietv.py b/channels/mondoserietv.py index fc8e1498..7ca2e916 100644 --- a/channels/mondoserietv.py +++ b/channels/mondoserietv.py @@ -19,8 +19,8 @@ list_language = IDIOMAS.values() list_servers = ['akstream'] list_quality = ['default'] -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'mondoserietv') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'mondoserietv') +checklinks = config.get_setting('checklinks', 'mondoserietv') +checklinks_number = config.get_setting('checklinks_number', 'mondoserietv') headers = {'Referer': host} @@ -308,8 +308,8 @@ def findvideos(item): # Requerido para Filtrar enlaces - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para FilterTools diff --git a/channels/piratestreaming.py b/channels/piratestreaming.py index a3598e2a..f00b0b9d 100644 --- a/channels/piratestreaming.py +++ b/channels/piratestreaming.py @@ -24,8 +24,8 @@ list_servers = ['speedvideo', 'openload', 'youtube'] list_quality = ['default'] -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'piratestreaming') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'piratestreaming') +checklinks = config.get_setting('checklinks', 'piratestreaming') +checklinks_number = config.get_setting('checklinks_number', 'piratestreaming') headers = [['Referer', host]] @@ -243,8 +243,8 @@ def findvideos(item): # Requerido para Filtrar enlaces - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para FilterTools diff --git a/channels/seriehd.json b/channels/seriehd.json index e2a505ec..ecd59d5c 100644 --- a/channels/seriehd.json +++ b/channels/seriehd.json @@ -4,8 +4,8 @@ "active": true, "adult": false, "language": ["ita"], - "thumbnail": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/seriehd.png", - "banner": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/seriehd.png", + "thumbnail": "seriehd.png", + "banner": "seriehd.png", "categories": ["tvshow"], "settings": [ { @@ -33,7 +33,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/seriehd.py b/channels/seriehd.py index 7a1e5974..5059cf5e 100644 --- a/channels/seriehd.py +++ b/channels/seriehd.py @@ -18,8 +18,8 @@ list_language = IDIOMAS.values() list_servers = ['verystream', 'openload', 'streamango', 'thevideome'] list_quality = ['1080p', '720p', '480p', '360'] -__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'seriehd') -__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'seriehd') +checklinks = config.get_setting('checklinks', 'seriehd') +checklinks_number = config.get_setting('checklinks_number', 'seriehd') headers = [['Referer', host]] @@ -137,8 +137,8 @@ def findvideos(item): # Requerido para Filtrar enlaces - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + if checklinks: + itemlist = servertools.check_list_links(itemlist, checklinks_number) # Requerido para FilterTools diff --git a/channels/serietvsubita.json b/channels/serietvsubita.json index 7a4eafad..fe08633c 100644 --- a/channels/serietvsubita.json +++ b/channels/serietvsubita.json @@ -4,8 +4,8 @@ "active": true, "adult": false, "language": ["ita"], - "thumbnail": "http://serietvsubita.xyz/wp-content/uploads/2012/07/logo.jpg", - "banner": "http://serietvsubita.xyz/wp-content/uploads/2012/07/logo.jpg", + "thumbnail": "serietvsubita.png", + "banner": "serietvsubita.png", "categories": ["tvshow"], "settings": [ { @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -49,7 +49,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/serietvsubita.py b/channels/serietvsubita.py index 0e587acc..3ce72d6b 100644 --- a/channels/serietvsubita.py +++ b/channels/serietvsubita.py @@ -21,8 +21,8 @@ list_language = IDIOMAS.values() list_servers = ['gounlimited','verystream','streamango','openload'] list_quality = ['default'] -# __comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__) -# __comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__) +# checklinks = config.get_setting('checklinks', __channel__) +# checklinks_number = config.get_setting('checklinks_number', __channel__) def mainlist(item): @@ -52,7 +52,7 @@ def mainlist(item): # ---------------------------------------------------------------------------------------------------------------- def cleantitle(scrapedtitle): scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle.strip()) - scrapedtitle = scrapedtitle.replace('[HD]', '').replace('’', '\'').replace('×','x').replace('Game of Thrones –','') + scrapedtitle = scrapedtitle.replace('[HD]', '').replace('’', '\'').replace('×','x').replace('Game of Thrones –','').replace('In The Dark 2019','In The Dark (2019)').strip() year = scrapertools.find_single_match(scrapedtitle, '\((\d{4})\)') if year: scrapedtitle = scrapedtitle.replace('(' + year + ')', '') @@ -195,7 +195,7 @@ def episodios(item, itemlist=[]): infoLabels = {} infoLabels['season'] = season infoLabels['episode'] = episode - + fullepisode+=' Sub-ITA' itemlist.append( Item(channel=item.channel, extra=item.extra, @@ -264,8 +264,8 @@ def findvideos(item): # Controlla se i link sono validi - # if __comprueba_enlaces__: - # itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + # if checklinks: + # itemlist = servertools.check_list_links(itemlist, checklinks_number) # # autoplay.start(itemlist, item) @@ -293,23 +293,27 @@ def peliculas_tv(item): scrapedthumbnail = "" scrapedplot = "" scrapedtitle = cleantitle(scrapedtitle) + infoLabels = {} episode = scrapertools.find_multiple_matches(scrapedtitle, r'((\d*)x(\d*))')[0] title = scrapedtitle.split(" S0")[0].strip() title = title.split(" S1")[0].strip() title = title.split(" S2")[0].strip() - + infoLabels['season'] = episode[1] + infoLabels['episode'] = episode[2] itemlist.append( Item(channel=item.channel, action="findvideos", fulltitle=scrapedtitle, show=scrapedtitle, - title=scrapedtitle, + title=title+" - "+episode[0]+" Sub-ITA", url=scrapedurl, thumbnail=scrapedthumbnail, - contentSerieName=title+" ("+episode[0]+" Sub-Ita)", + contentSerieName=title, + contentLanguage='Sub-ITA', plot=scrapedplot, + infoLabels=infoLabels, folder=True)) tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) diff --git a/channels/serietvu.json b/channels/serietvu.json index 16d2e1fe..abb5dbd5 100644 --- a/channels/serietvu.json +++ b/channels/serietvu.json @@ -4,8 +4,8 @@ "active": true, "adult": false, "language": ["ita"], - "thumbnail": "https://www.serietvu.club/wp-content/themes/gurarjbar/images/logo.png", - "banner": "https://www.serietvu.club/wp-content/themes/gurarjbar/images/logo.png", + "thumbnail": "serietvu.png", + "banner": "serietvu.png", "categories": ["tvshow"], "settings": [ { @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -49,7 +49,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero de link da verificare", "default": 1, diff --git a/channels/serietvu.py b/channels/serietvu.py index 80fb13c9..d13b3451 100644 --- a/channels/serietvu.py +++ b/channels/serietvu.py @@ -20,8 +20,8 @@ list_language = IDIOMAS.values() list_servers = ['speedvideo'] list_quality = ['default'] -# __comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__) -# __comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__) +# checklinks = config.get_setting('checklinks', __channel__) +# checklinks_number = config.get_setting('checklinks_number', __channel__) @@ -52,7 +52,7 @@ def mainlist(item): # ---------------------------------------------------------------------------------------------------------------- def cleantitle(scrapedtitle): scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle.strip()) - scrapedtitle = scrapedtitle.replace('[HD]', '').replace('’', '\'').replace('Game of Thrones –','').replace('Flash 2014','Flash') + scrapedtitle = scrapedtitle.replace('[HD]', '').replace('’', '\'').replace('– Il Trono di Spade','').replace('Flash 2014','Flash') year = scrapertools.find_single_match(scrapedtitle, '\((\d{4})\)') if year: scrapedtitle = scrapedtitle.replace('(' + year + ')', '') @@ -121,10 +121,14 @@ def episodios(item): matches = re.compile(patron, re.DOTALL).findall(blocco) for scrapedextra, scrapedurl, scrapedimg, scrapedtitle in matches: number = scrapertools.decodeHtmlentities(scrapedtitle.replace("Episodio", "")).strip() + + title = value + "x" + number.zfill(2) + + itemlist.append( Item(channel=item.channel, action="findvideos", - title=value + "x" + number.zfill(2), + title=title, fulltitle=scrapedtitle, contentType="episode", url=scrapedurl, @@ -145,11 +149,12 @@ def findvideos(item): support.log(item.channel + " findvideos") itemlist = support.server(item, data=item.url) + # itemlist = filtertools.get_links(itemlist, item, list_language) # Controlla se i link sono validi - # if __comprueba_enlaces__: - # itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + # if checklinks: + # itemlist = servertools.check_list_links(itemlist, checklinks_number) # # autoplay.start(itemlist, item) @@ -177,8 +182,8 @@ def findepisodevideo(item): # itemlist = filtertools.get_links(itemlist, item, list_language) # Controlla se i link sono validi - # if __comprueba_enlaces__: - # itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) + # if checklinks: + # itemlist = servertools.check_list_links(itemlist, checklinks_number) # # autoplay.start(itemlist, item) @@ -192,6 +197,45 @@ def findepisodevideo(item): def latestep(item): support.log(item.channel + " latestep") itemlist = [] + titles = [] + + #recupero gli episodi in home nella sezione Ultimi episodi aggiunti + data = httptools.downloadpage(host, headers=headers).data + + block = scrapertools.find_single_match(data,r"Ultimi episodi aggiunti.*?

    ") + regex = r'(.*?)\((\d*?)x(\d*?)\s(Sub-Ita|Ita)' + matches = re.compile(regex, re.DOTALL).findall(block) + + for scrapedurl, scrapedimg, scrapedtitle, scrapedseason, scrapedepisode, scrapedlanguage in matches: + infoLabels = {} + year = scrapertools.find_single_match(scrapedtitle, '\((\d{4})\)') + if year: + infoLabels['year'] = year + infoLabels['episode'] = scrapedepisode + infoLabels['season'] = scrapedseason + episode = scrapedseason+"x"+scrapedepisode + + scrapedtitle = cleantitle(scrapedtitle) + title = scrapedtitle+" - "+episode + contentlanguage = "" + if scrapedlanguage.strip().lower() != 'ita': + title +=" Sub-ITA" + contentlanguage = 'Sub-ITA' + + titles.append(title) + itemlist.append( + Item(channel=item.channel, + action="findepisodevideo", + title=title, + fulltitle=title, + url=scrapedurl, + extra=[[scrapedseason,scrapedepisode]], + thumbnail=scrapedimg, + contentSerieName=scrapedtitle, + contentLanguage=contentlanguage, + contentType='episode', + infoLabels=infoLabels, + folder=True)) data = httptools.downloadpage(item.url, headers=headers).data @@ -209,23 +253,38 @@ def latestep(item): infoLabels['tvshowtitle'] = scrapedtitle episodio = re.compile(r'(\d+)x(\d+)', re.DOTALL).findall(scrapedinfo) - title = "%s %s" % (scrapedtitle, scrapedinfo) + infoLabels['episode'] = episodio[0][1] + infoLabels['season'] = episodio[0][0] + + episode = infoLabels['season'] + "x" + infoLabels['episode'] + title = "%s - %s" % (scrapedtitle, episode) + title = title.strip() + contentlanguage = "" + if 'sub-ita' in scrapedinfo.lower(): + title+=" Sub-ITA" + contentlanguage = 'Sub-ITA' + + if title in titles: continue itemlist.append( Item(channel=item.channel, action="findepisodevideo", title=title, - fulltitle=scrapedtitle, + fulltitle=title, url=scrapedurl, extra=episodio, thumbnail=scrapedimg, - show=scrapedtitle, - contentTitle=scrapedtitle, - contentSerieName=title, + contentSerieName=scrapedtitle, + contentLanguage=contentlanguage, infoLabels=infoLabels, + contentType='episode', folder=True)) + + tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) + # logger.debug("".join(map(str,itemlist))) + return itemlist @@ -290,7 +349,7 @@ def categorie(item): Item(channel=item.channel, action="lista_serie", title=scrapedtitle, - contentType="tv", + contentType="tvshow", url="%s%s" % (host, scrapedurl), thumbnail=item.thumbnail, folder=True)) diff --git a/channels/tantifilm.json b/channels/tantifilm.json index e181261f..ceadbfe6 100644 --- a/channels/tantifilm.json +++ b/channels/tantifilm.json @@ -34,7 +34,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -42,7 +42,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero di link da verificare", "default": 1, diff --git a/channels/toonitalia.json b/channels/toonitalia.json index 23a3892b..1ba2b01d 100644 --- a/channels/toonitalia.json +++ b/channels/toonitalia.json @@ -33,7 +33,7 @@ "visible": true }, { - "id": "comprueba_enlaces", + "id": "checklinks", "type": "bool", "label": "Verifica se i link esistono", "default": false, @@ -41,7 +41,7 @@ "visible": true }, { - "id": "comprueba_enlaces_num", + "id": "checklinks_number", "type": "list", "label": "Numero di link da verificare", "default": 1, diff --git a/core/channeltools.py b/core/channeltools.py index d17fc86e..af001487 100644 --- a/core/channeltools.py +++ b/core/channeltools.py @@ -42,8 +42,7 @@ def get_channel_parameters(channel_name): channel_parameters["language"] = channel_parameters.get("language", ["all"]) channel_parameters["adult"] = channel_parameters.get("adult", False) channel_parameters["active"] = channel_parameters.get("active", False) - channel_parameters["include_in_global_search"] = channel_parameters.get("include_in_global_search", - False) + channel_parameters["include_in_global_search"] = channel_parameters.get("include_in_global_search", False) channel_parameters["categories"] = channel_parameters.get("categories", list()) channel_parameters["thumbnail"] = channel_parameters.get("thumbnail", "") @@ -87,8 +86,7 @@ def get_channel_parameters(channel_name): channel_parameters["include_in_global_search"] = True elif s['id'] == "filter_languages": channel_parameters["filter_languages"] = s.get('lvalues',[]) - elif not s['id'].startswith("include_in_") and \ - (s.get('enabled', False) or s.get('visible', False)): + elif s['id'].startswith("include_in_"): channel_parameters["has_settings"] = True del channel_parameters['settings'] diff --git a/core/scrapertools.py b/core/scrapertools.py index 58dd8ea6..a0e5b2a1 100644 --- a/core/scrapertools.py +++ b/core/scrapertools.py @@ -365,6 +365,9 @@ def get_season_and_episode(title): @return: Numero de temporada y episodio en formato "1x01" o cadena vacia si no se han encontrado """ filename = "" + # 4l3x87 - fix for series example 9-1-1 + # original_title = title + # title = title.replace('9-1-1','') patrons = ["(\d+)\s*[x-]\s*(\d+)", "(\d+)\s*×\s*(\d+)", "(?:s|t)(\d+)e(\d+)", "(?:season|temp|stagione\w*)\s*(\d+)\s*(?:capitulo|epi|episode|episodio\w*)\s*(\d+)"] @@ -372,6 +375,7 @@ def get_season_and_episode(title): for patron in patrons: try: matches = re.compile(patron, re.I).search(title) + if matches: if len(matches.group(1)) == 1: filename = matches.group(1) + "x" + matches.group(2).zfill(2) diff --git a/core/servertools.py b/core/servertools.py index 260812bc..8ecea6fd 100644 --- a/core/servertools.py +++ b/core/servertools.py @@ -16,8 +16,6 @@ from platformcode import config, logger from platformcode import platformtools from servers.decrypters import zcrypt -from specials import autoplay # by greko - dict_servers_parameters = {} @@ -35,7 +33,7 @@ def find_video_items(item=None, data=None): @return: devuelve el itemlist con los resultados @rtype: list """ - logger.info("ITEM DATA : %s" % item) + logger.info() itemlist = [] # Descarga la página @@ -60,29 +58,6 @@ def find_video_items(item=None, data=None): itemlist.append( item.clone(title=title, action="play", url=url, thumbnail=thumbnail, server=server, folder=False)) - """ - fix by Greko inizio - Controllo su tutti i canali: - - se i link sono validi per tutti i canali - - autoplay - - aggiungi in videoteca - non c'è bisogno dei controlli nel file[.json, py] del canale - """ - itemlist = check_list_links(itemlist) - - ########## Da risolvere - # Per AutoPlay - autoplay.start(itemlist, item) - - # Decommentare per la voce aggiungi alla videoteca di tutti i canali - # non funziona se il canale ha una def findvideos() - if item.extra != "library" and item.contentType != 'episode': - itemlist.append(Item(channel=item.channel, title="Aggiungi alla Videoteca", - action="add_pelicula_to_library", url=item.url, - contentTitle=item.contentTitle, infoLabels = item.infoLabels - )) - # fix by Greko fine - return itemlist @@ -145,7 +120,7 @@ def get_servers_itemlist(itemlist, fnc=None, sort=False): # Ordenar segun favoriteslist si es necesario if sort: itemlist = sort_servers(itemlist) - + return itemlist @@ -181,7 +156,7 @@ def findvideos(data, skip=False): if config.get_setting("filter_servers") == False: is_filter_servers = False if not devuelve and is_filter_servers: platformtools.dialog_ok(config.get_localized_string(60000), config.get_localized_string(60001)) - + return devuelve @@ -208,8 +183,6 @@ def findvideosbyserver(data, serverid): devuelve.append(value) logger.info(msg) - - return devuelve diff --git a/core/support.py b/core/support.py index 80f89599..800a880a 100644 --- a/core/support.py +++ b/core/support.py @@ -61,15 +61,7 @@ def hdpass_get_servers(item): url=url_decode(media_url))) log("video -> ", res_video) - __comprueba_enlaces__ = config.get_setting('comprueba_enlaces', item.channel) - __comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', item.channel) - - if __comprueba_enlaces__: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) - if xbmcaddon.Addon('plugin.video.kod').getSetting('checklinks'): - itemlist = servertools.check_list_links(itemlist, xbmcaddon.Addon('plugin.video.kod').getSetting('checklinks_number')) - - return itemlist + return controls(itemlist, item, AutoPlay=True, CheckLinks=True) def url_decode(url_enc): @@ -141,7 +133,7 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data="" blocks = scrapertoolsV2.find_multiple_matches(block, regex) block = "" for b in blocks: - block += "\n" + str(b) # by greko + block += "\n" + b log('BLOCK ', n, '=', block) else: block = data @@ -149,7 +141,7 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data="" matches = scrapertoolsV2.find_multiple_matches(block, patron) log('MATCHES =', matches) - known_keys = ['url', 'title', 'episode', 'thumb', 'quality', 'year', 'plot', 'duration', 'genere', 'rating', 'lang'] #by greko aggiunto episode + lang + known_keys = ['url', 'title', 'episode', 'thumb', 'quality', 'year', 'plot', 'duration', 'genere', 'rating'] #by greko aggiunto episode for match in matches: if len(listGroups) > len(match): # to fix a bug match = list(match) @@ -165,19 +157,12 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data="" title = scrapertoolsV2.decodeHtmlentities(scraped["title"]).strip() plot = scrapertoolsV2.htmlclean(scrapertoolsV2.decodeHtmlentities(scraped["plot"])) - # modificato by Greko inizio - longtitle = '[B]' + title + '[/B] ' - if scraped["quality"]: - longtitle += '[COLOR blue][' + scraped["quality"] + '][/COLOR]'#'[B]' + title + '[/B] - [B]' + scraped["episode"] + '[/B][COLOR blue][' + scraped["quality"] + '][/COLOR]' # by greko aggiunto episode - if scraped["episode"]: - longtitle += '[B]' + scraped["episode"] + '[/B]'#'[B]' + title + '[/B] - [B]' + scraped["episode"] + '[/B]' - if scraped["lang"]: - if 'sub' in scraped["lang"].lower(): - lang = 'Sub-ITA' - else: - lang = 'ITA' - longtitle += '[COLOR blue][ ' + lang + ' ][/COLOR]' - # modificato by Greko fine + if scraped["quality"] and scraped["episode"]: # by greko aggiunto episode + longtitle = '[B]' + title + '[/B] - [B]' + scraped["episode"] + '[/B][COLOR blue][' + scraped["quality"] + '][/COLOR]' # by greko aggiunto episode + elif scraped["episode"]: # by greko aggiunto episode + longtitle = '[B]' + title + '[/B] - [B]' + scraped["episode"] + '[/B]' # by greko aggiunto episode + else: + longtitle = '[B]' + title + '[/B]' if item.infoLabels["title"] or item.fulltitle: # if title is set, probably this is a list of episodes or video sources infolabels = item.infoLabels @@ -508,11 +493,6 @@ def nextPage(itemlist, item, data, patron, function_level=1): return itemlist def server(item, data='', headers='', AutoPlay=True, CheckLinks=True): - - __comprueba_enlaces__ = config.get_setting('comprueba_enlaces', item.channel) - log(__comprueba_enlaces__ ) - __comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', item.channel) - log(__comprueba_enlaces_num__ ) if not data: data = httptools.downloadpage(item.url, headers=headers).data @@ -527,14 +507,29 @@ def server(item, data='', headers='', AutoPlay=True, CheckLinks=True): videoitem.channel = item.channel videoitem.contentType = item.contentType - if __comprueba_enlaces__ and CheckLinks: - itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__) - if xbmcaddon.Addon('plugin.video.kod').getSetting('checklinks'): - itemlist = servertools.check_list_links(itemlist, xbmcaddon.Addon('plugin.video.kod').getSetting('checklinks_number')) + return controls(itemlist, item, AutoPlay, CheckLinks) + +def controls(itemlist, item, AutoPlay=True, CheckLinks=True): + from core import jsontools + from platformcode.config import get_setting + CL = get_setting('checklinks') or get_setting('checklinks', item.channel) + 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'] + if CL and not AP: + if get_setting('checklinks', item.channel): + checklinks = get_setting('checklinks', item.channel) + else: + checklinks = get_setting('checklinks') + if get_setting('checklinks_number', item.channel): + checklinks_number = get_setting('checklinks_number', item.channel) + else: + checklinks_number = get_setting('checklinks_number') + itemlist = servertools.check_list_links(itemlist, checklinks_number) if AutoPlay == True: autoplay.start(itemlist, item) - return itemlist diff --git a/core/tmdb.py b/core/tmdb.py index d71371b1..c57b1df1 100644 --- a/core/tmdb.py +++ b/core/tmdb.py @@ -324,8 +324,9 @@ def set_infoLabels_item(item, seekTmdb=True, idioma_busqueda=def_lang, lock=None __leer_datos(otmdb_global) - if lock and lock.locked(): - lock.release() + # 4l3x87 - fix for overlap infoLabels if there is episode or season + # if lock and lock.locked(): + # lock.release() if item.infoLabels['episode']: try: @@ -354,6 +355,10 @@ def set_infoLabels_item(item, seekTmdb=True, idioma_busqueda=def_lang, lock=None item.infoLabels['rating'] = episodio['episodio_vote_average'] item.infoLabels['votes'] = episodio['episodio_vote_count'] + # 4l3x87 - fix for overlap infoLabels if there is episode or season + if lock and lock.locked(): + lock.release() + return len(item.infoLabels) else: @@ -374,8 +379,17 @@ def set_infoLabels_item(item, seekTmdb=True, idioma_busqueda=def_lang, lock=None if temporada['poster_path']: item.infoLabels['poster_path'] = 'http://image.tmdb.org/t/p/original' + temporada['poster_path'] item.thumbnail = item.infoLabels['poster_path'] + + # 4l3x87 - fix for overlap infoLabels if there is episode or season + if lock and lock.locked(): + lock.release() + return len(item.infoLabels) + # 4l3x87 - fix for overlap infoLabels if there is episode or season + if lock and lock.locked(): + lock.release() + # Buscar... else: otmdb = copy.copy(otmdb_global) diff --git a/platformcode/launcher.py b/platformcode/launcher.py index df7e000b..bc1e52a4 100644 --- a/platformcode/launcher.py +++ b/platformcode/launcher.py @@ -65,7 +65,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) + xbmc_videolibrary.ask_set_content(1, config.get_setting('videolibrary_kodi_force')) config.set_setting('show_once', True) logger.info(item.tostring()) diff --git a/platformcode/xbmc_videolibrary.py b/platformcode/xbmc_videolibrary.py index ecf46d27..848bbaf1 100644 --- a/platformcode/xbmc_videolibrary.py +++ b/platformcode/xbmc_videolibrary.py @@ -535,12 +535,17 @@ def set_content(content_type, silent=False): 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)] - seleccion = platformtools.dialog_select(config.get_localized_string(70094), scraper) + if forced: + 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: @@ -560,7 +565,7 @@ 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: + if continuar and not forced: xbmc.executebuiltin('xbmc.addon.opensettings(metadata.themoviedb.org)', True) # Instalar Universal Movie Scraper @@ -584,12 +589,15 @@ def set_content(content_type, silent=False): continuar = (install and continuar) if not continuar: msg_text = config.get_localized_string(70097) - if continuar: + if continuar and not forced: xbmc.executebuiltin('xbmc.addon.opensettings(metadata.universal)', True) else: # SERIES scraper = [config.get_localized_string(70098), config.get_localized_string(70093)] - seleccion = platformtools.dialog_select(config.get_localized_string(70107), scraper) + if forced: + seleccion = 0 # tvdb + else: + seleccion = platformtools.dialog_select(config.get_localized_string(70107), scraper) # Instalar The TVDB if seleccion == -1 or seleccion == 0: @@ -611,7 +619,7 @@ 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) - if continuar: + if continuar and not forced: xbmc.executebuiltin('xbmc.addon.opensettings(metadata.tvdb.com)', True) # Instalar The Movie Database @@ -636,7 +644,7 @@ def set_content(content_type, silent=False): continuar = (install and continuar) if not continuar: msg_text = config.get_localized_string(60047) - if continuar: + if continuar and not forced: xbmc.executebuiltin('xbmc.addon.opensettings(metadata.tvshows.themoviedb.org)', True) idPath = 0 diff --git a/resources/media/channels/banner/fastsubita.png b/resources/media/channels/banner/fastsubita.png new file mode 100644 index 00000000..2d226718 Binary files /dev/null and b/resources/media/channels/banner/fastsubita.png differ diff --git a/resources/media/channels/banner/seriehd.png b/resources/media/channels/banner/seriehd.png new file mode 100644 index 00000000..027c0a15 Binary files /dev/null and b/resources/media/channels/banner/seriehd.png differ diff --git a/resources/media/channels/banner/serietvsubita.png b/resources/media/channels/banner/serietvsubita.png new file mode 100644 index 00000000..62f21d1c Binary files /dev/null and b/resources/media/channels/banner/serietvsubita.png differ diff --git a/resources/media/channels/banner/serietvu.png b/resources/media/channels/banner/serietvu.png new file mode 100644 index 00000000..9e1c0929 Binary files /dev/null and b/resources/media/channels/banner/serietvu.png differ diff --git a/resources/media/channels/thumb/fastsubita.png b/resources/media/channels/thumb/fastsubita.png new file mode 100644 index 00000000..d1d7be10 Binary files /dev/null and b/resources/media/channels/thumb/fastsubita.png differ diff --git a/resources/media/channels/thumb/seriehd.png b/resources/media/channels/thumb/seriehd.png new file mode 100644 index 00000000..e310b89f Binary files /dev/null and b/resources/media/channels/thumb/seriehd.png differ diff --git a/resources/media/channels/thumb/serietvsubita.png b/resources/media/channels/thumb/serietvsubita.png new file mode 100644 index 00000000..38709e2a Binary files /dev/null and b/resources/media/channels/thumb/serietvsubita.png differ diff --git a/resources/media/channels/thumb/serietvu.png b/resources/media/channels/thumb/serietvu.png new file mode 100644 index 00000000..3835135f Binary files /dev/null and b/resources/media/channels/thumb/serietvu.png differ diff --git a/resources/settings.xml b/resources/settings.xml index 3b1c9059..79ac5830 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -40,6 +40,7 @@ + @@ -145,5 +146,4 @@ - \ No newline at end of file diff --git a/servers/decrypters/zcrypt.py b/servers/decrypters/zcrypt.py index 9a80edf3..c1d93724 100644 --- a/servers/decrypters/zcrypt.py +++ b/servers/decrypters/zcrypt.py @@ -88,3 +88,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= ret = page_url+" "+str(devuelve) if devuelve else page_url logger.info(" RET=" + str(ret)) return ret + + diff --git a/specials/news.py b/specials/news.py index 179fb422..734ddef1 100644 --- a/specials/news.py +++ b/specials/news.py @@ -396,6 +396,10 @@ def get_title(item): if not item.contentSeason: item.contentSeason = '1' title = "%s - %sx%s" % (title, item.contentSeason, str(item.contentEpisodeNumber).zfill(2)) + #4l3x87 - fix to add Sub-ITA in newest + if item.contentLanguage: + title+=" "+item.contentLanguage + elif item.contentTitle: # Si es una pelicula con el canal adaptado title = item.contentTitle