diff --git a/channels.json b/channels.json index 53f1eb08..98d53014 100644 --- a/channels.json +++ b/channels.json @@ -3,50 +3,63 @@ "altadefinizione01_link": "http://altadefinizione01.link", "altadefinizione01": "https://altadefinizione01.to", "altadefinizioneclick": "https://altadefinizione.cloud", - - "altadefinizioneclub": "https://altadefinizione.cloud", - "altadefinizionehd": "https://altadefinizionehd.org", + "altadefinizionehd": "https://altadefinizione.doctor", "animeforge": "https://ww1.animeforce.org", "animeleggendari": "https://animepertutti.com", "animestream": "https://www.animeworld.it", + "animespace": "https://animespace.tv", "animesubita": "http://www.animesubita.org", "animetubeita": "http://www.animetubeita.com", "animevision": "https://www.animevision.it", "animeworld": "https://www.animeworld.it", "asiansubita": "http://asiansubita.altervista.org", "casacinema": "https://www.casacinema.site", - "cb01anime": "http://www.cineblog01.ink/anime/", + "casacinemainfo": "https://www.casacinema.info", + "cb01anime": "http://www.cineblog01.ink", "cineblog01": "https://cb01.tools", - "documentaristreamingdb": "https://documentari-streaming-da.com", - "downloadme": "https://www.downloadme.gratis", - "dragonballforever": "https://www.dragonballforever.it", + "cinemalibero": "https://cinemalibero.icu", + "cinemastreaming": "https://cinemastreaming.icu", + "documentaristreamingda": "https://documentari-streaming-da.com", "dreamsub": "https://www.dreamsub.stream", "eurostreaming": "https://eurostreaming.gratis", "eurostreaming_video": "https://www.eurostreaming.best", "fastsubita": "http://fastsubita.com", "ffilms":"https://ffilms.org", + "filmigratis": "https://filmigratis.net", "filmgratis": "https://www.filmaltadefinizione.net", "filmontv": "https://www.comingsoon.it", "filmpertutti": "https://www.filmpertutti.tube", + "filmsenzalimiti": "https://filmsenzalimiti.best", + "filmsenzalimiticc": "https://www.filmsenzalimiti.host", "filmsenzalimiti_blue": "https://filmsenzalimiti.best", "filmsenzalimiti_info": "https://www.filmsenzalimiti.host", "filmstreaming01": "https://filmstreaming01.com", "filmstreamingita": "http://filmstreamingita.live", "guarda_serie": "https://guardaserie.site", "guardafilm": "http://www.guardafilm.top", + "guardarefilm": "https://www.guardarefilm.video", + "guardaseriecc": "https://guardaserie.site", + "guardaserieclick": "https://www.guardaserie.media", "guardaserie_stream": "https://guardaserie.co", "guardaserieonline": "http://www.guardaserie.media", "guardogratis": "http://guardogratis.io", "ilgeniodellostreaming": "https://ilgeniodellostreaming.pw", - "italiaserie": "https://italiaserie.org", "italiafilm": "https://www.italia-film.pw", + "italiafilmhd": "https://italiafilm.info", "italiafilmvedohd": "https://italiafilm.info", - "italiaserie_uno": "https:://italiaserie.org", + "italiaserie": "https://italiaserie.org", + "itastreaming": "https://itastreaming.film", "majintoon": "https://toonitalia.org", + "mondolunatico": "http://mondolunatico.org", + "mondolunatico2": "http://mondolunatico.org/stream/", "mondoserietv": "https://mondoserietv.com", "piratestreaming": "https://www.piratestreaming.watch", "seriehd": "https://www.seriehd.info", "serietvonline": "https://serietvonline.xyz", + "serietvsubita": "http://serietvsubita.xyz", "serietvu": "https://www.serietvu.club", - "tantifilm": "https://www.tantifilm.plus" + "streamingaltadefinizione": "https://www.streamingaltadefinizione.space", + "streamking": "http://streamking.cc", + "tantifilm": "https://www.tantifilm.plus", + "toonitalia": "https://toonitalia.org" } diff --git a/channels/LIKUOO.py b/channels/LIKUOO.py index fbeb3023..f42ed721 100644 --- a/channels/LIKUOO.py +++ b/channels/LIKUOO.py @@ -8,6 +8,7 @@ from core import scrapertools from core import servertools from core.item import Item from platformcode import logger +from platformcode import config host = 'http://www.likuoo.video' diff --git a/channels/TXXX.py b/channels/TXXX.py index 26c8137a..253b7312 100644 --- a/channels/TXXX.py +++ b/channels/TXXX.py @@ -8,6 +8,7 @@ from core import httptools from core import scrapertools from core.item import Item from platformcode import logger +from platformcode import config host = 'http://www.txxx.com' diff --git a/channels/absoluporn.py b/channels/absoluporn.py index f5fce909..e5774e59 100644 --- a/channels/absoluporn.py +++ b/channels/absoluporn.py @@ -7,6 +7,7 @@ from core import httptools from core import scrapertools from core.item import Item from platformcode import logger +from platformcode import config host = 'http://www.absoluporn.es' diff --git a/channels/alsoporn.py b/channels/alsoporn.py index 1ada8f96..306d00d5 100644 --- a/channels/alsoporn.py +++ b/channels/alsoporn.py @@ -7,6 +7,7 @@ from core import httptools from core import scrapertools from core.item import Item from platformcode import logger +from platformcode import config host = 'http://www.alsoporn.com' diff --git a/channels/altadefinizione01.py b/channels/altadefinizione01.py index a9f17b5e..dd186a5e 100644 --- a/channels/altadefinizione01.py +++ b/channels/altadefinizione01.py @@ -12,7 +12,7 @@ from specials import autoplay #host = "https://altadefinizione01.to" __channel__ = "altadefinizione01" -host = config.get_addon_version(__channel__) +host = config.get_channel_url(__channel__) IDIOMAS = {'Italiano': 'IT'} list_language = IDIOMAS.values() diff --git a/channels/altadefinizionehd.py b/channels/altadefinizionehd.py index 33693d4f..08757113 100644 --- a/channels/altadefinizionehd.py +++ b/channels/altadefinizionehd.py @@ -10,7 +10,8 @@ from core.item import Item from platformcode import logger, config from specials import autoplay -host = "https://altadefinizione.doctor" +__channel__ = 'altadefinizionehd' +host = config.get_channel_url(__channel__) headers = [['Referer', host]] diff --git a/channels/analdin.py b/channels/analdin.py index 9520d314..278d1433 100644 --- a/channels/analdin.py +++ b/channels/analdin.py @@ -7,6 +7,7 @@ from core import httptools from core import scrapertools from core.item import Item from platformcode import logger +from platformcode import config host = 'https://www.analdin.com/es' diff --git a/channels/animeforce.py b/channels/animeforce.py index 4113f6c5..c38b6d1b 100644 --- a/channels/animeforce.py +++ b/channels/animeforce.py @@ -12,7 +12,8 @@ from core.item import Item from platformcode import config, logger from servers.decrypters import adfly -host = "https://ww1.animeforce.org" +__channel__ = "animeforge" +host = config.get_channel_url(__channel__) IDIOMAS = {'Italiano': 'IT'} list_language = IDIOMAS.values() diff --git a/channels/animeleggendari.py b/channels/animeleggendari.py index 8ac1b391..dfc9371e 100644 --- a/channels/animeleggendari.py +++ b/channels/animeleggendari.py @@ -12,7 +12,8 @@ from lib.js2py.host import jsfunctions from platformcode import logger, config from specials import autoplay, autorenumber -host = "https://animepertutti.com" +__channel__ = "animeleggendari" +host = config.get_channel_url(__channel__) # Richiesto per Autoplay IDIOMAS = {'Italiano': 'IT'} @@ -34,7 +35,6 @@ def mainlist(item): menu(itemlist, 'Anime in Corso', 'peliculas', host + '/category/anime-in-corso/') menu(itemlist, 'Genere', 'genres', host) menu(itemlist, 'Cerca...', 'search') - menu(itemlist, 'novita', 'newest') autoplay.init(item.channel, list_servers, list_quality) autoplay.show_option(item.channel, itemlist) @@ -137,7 +137,7 @@ def episodios(item): itemlist.append( Item(channel=item.channel, action='findvideos', - contentType=item.contentType, + contentType='episode', title=support.typo('Episodio 1 bold'), fulltitle=item.title, url=item.url, @@ -149,7 +149,7 @@ def episodios(item): itemlist.append( Item(channel=item.channel, action='findvideos', - contentType=item.contentType, + contentType='episode', title=support.typo('Episodio ' + number,'bold'), fulltitle=item.title, url=url, diff --git a/channels/animespace.py b/channels/animespace.py index aa910a86..9e6a6d5a 100644 --- a/channels/animespace.py +++ b/channels/animespace.py @@ -15,7 +15,8 @@ from platformcode import logger, config from specials import autoplay from specials import renumbertools -host = "https://animespace.tv/" +__channel__ = "animespace" +host = config.get_channel_url(__channel__) checklinks = config.get_setting('checklinks', 'animespace') checklinks_number = config.get_setting('checklinks_number', 'animespace') diff --git a/channels/animesubita.py b/channels/animesubita.py index 5559f58b..80e4e08a 100644 --- a/channels/animesubita.py +++ b/channels/animesubita.py @@ -13,8 +13,8 @@ from core import httptools, scrapertools, tmdb, support from core.item import Item from platformcode import logger, config -host = "http://www.animesubita.org" - +__channel__ = "animesubita" +host = config.get_channel_url(__channel__) PERPAGE = 20 # ---------------------------------------------------------------------------------------------------------------- diff --git a/channels/animetubeita.py b/channels/animetubeita.py index 817d77d7..d261c048 100644 --- a/channels/animetubeita.py +++ b/channels/animetubeita.py @@ -10,7 +10,8 @@ from core import httptools, scrapertools, tmdb from core.item import Item from platformcode import logger, config -host = "http://www.animetubeita.com" +__channel__ = "animetubeita" +host = config.get_channel_url(__channel__) hostlista = host + "/lista-anime/" hostgeneri = host + "/generi/" hostcorso = host + "/category/serie-in-corso/" diff --git a/channels/animeworld.py b/channels/animeworld.py index 8272fbe3..aa8204e0 100644 --- a/channels/animeworld.py +++ b/channels/animeworld.py @@ -13,7 +13,8 @@ from core.item import Item from platformcode import logger, config from specials import autoplay, autorenumber -host = config.get_setting("channel_host", 'animeworld') +__channel__ = "animeworld" +host = config.get_channel_url(__channel__) headers = [['Referer', host]] IDIOMAS = {'Italiano': 'Italiano'} @@ -229,7 +230,7 @@ def video(item): # Controlla se sono Episodi o Film if movie == '': - contentType = 'episode' + contentType = 'tvshow' action = 'episodios' else: contentType = 'movie' @@ -256,65 +257,45 @@ def video(item): def episodios(item): log() - itemlist = [] - - data = httptools.downloadpage(item.url, headers=headers).data.replace('\n', '') - block1 = scrapertoolsV2.find_single_match(data, r'
(.*?)
') - - patron = r'
  • (.*?)<\/a>' - matches = re.compile(patron, re.DOTALL).findall(block) - - extra = {} - extra['data'] = block1.replace('Attenzione! Non ci sono episodi in questa sezione, torna indietro!.','') + itemlist = [] + + patron_block = r'
    (.*?)') - servers = scrapertoolsV2.find_multiple_matches(block,r'class="tab.*?data-name="([0-9]+)">([^<]+)([^<]+)(.*?)')) - id = scrapertoolsV2.find_single_match(data,r'(.*?)
    ]+)".*?>([^(:(|[)]+)([^<]+)<\/a>', '
    + @@ -54,7 +55,7 @@ default="70137" visible="eq(-3,True)+eq(-1,True)+eq(-2,False)" enable="eq(-3,True)+eq(-1,True)+(-2,false)"/> - + diff --git a/servers/speedvideo.json b/servers/speedvideo.json index a095367c..5ef92e2c 100644 --- a/servers/speedvideo.json +++ b/servers/speedvideo.json @@ -5,8 +5,12 @@ "patterns": [ { "pattern": "speedvideo.net/(?:embed-|)([A-Z0-9a-z]+)", - "url": "https:\/\/speedvideo.net\/embed-\\1.html" - } + "url": "http://speedvideo.net/embed-\\1.html" + }, + { + "pattern": "speedvideo.net/(?:embed-|)([A-Z0-9a-z]+)", + "url": "https://speedvideo.net/embed-\\1.html" + } ] }, "free": true, diff --git a/specials/downloads.py b/specials/downloads.py index d92bf955..dad71e62 100644 --- a/specials/downloads.py +++ b/specials/downloads.py @@ -503,7 +503,7 @@ def download_from_server(item): unsupported_servers = ["torrent"] progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70178) % item.server) - channel = __import__(item.contentChannel, None, None, [item.contentChannel]) + channel = __import__('channels.%s' % item.contentChannel, None, None, ['channels.%s' % item.contentChannel]) if hasattr(channel, "play") and not item.play_menu: progreso.update(50, config.get_localized_string(70178) % item.server, config.get_localized_string(60003) % item.contentChannel) @@ -570,7 +570,7 @@ def download_from_best_server(item): result = {"downloadStatus": STATUS_CODES.error} progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70179)) - channel = __import__(item.contentChannel, None, None, [item.contentChannel]) + channel = __import__('channels.%s' % item.contentChannel, None, None, ['channels.%s' % item.contentChannel]) progreso.update(50, config.get_localized_string(70184), config.get_localized_string(70180) % item.contentChannel) @@ -756,8 +756,8 @@ def save_download(item): # Menu contextual if item.from_action and item.from_channel: - item.channel = str(item.from_channel) - item.action = str(item.from_action) + item.channel = item.from_channel + item.action = item.from_action del item.from_action del item.from_channel @@ -848,6 +848,7 @@ def save_download_tvshow(item): config.get_localized_string(30109)) else: for i in episodes: + i.contentChannel = item.contentChannel res = start_download(i) if res == STATUS_CODES.canceled: break diff --git a/videolibrary_service.py b/videolibrary_service.py index 18f64e10..03b56047 100644 --- a/videolibrary_service.py +++ b/videolibrary_service.py @@ -3,7 +3,7 @@ # Service for updating new episodes on library series # ------------------------------------------------------------ -import datetime, imp, math, threading, traceback, sys +import datetime, imp, math, threading, traceback, sys, glob @@ -310,14 +310,28 @@ def monitor_update(): check_for_update(overwrite=False) def get_channel_json(): - import urllib, os, xbmc, xbmcaddon - addon = xbmcaddon.Addon('plugin.video.kod') - ROOT_DIR = xbmc.translatePath(addon.getAddonInfo('Path')) + import urllib, os, xbmc + addon = config.get_addon_core() + ROOT_DIR = config.get_runtime_path() LOCAL_FILE = os.path.join(ROOT_DIR, "channels.json") if os.path.exists(LOCAL_FILE): os.remove(LOCAL_FILE) urllib.urlretrieve("https://raw.githubusercontent.com/kodiondemand/addon/master/channels.json", LOCAL_FILE) + + if addon.getSetting("use_custom_url") != "true": + channels_path = os.path.join(ROOT_DIR, "channels", '*.json') + channel_files = sorted(glob.glob(channels_path), key=lambda x: os.path.basename(x)) + for channel_file in channel_files: + if channel_file: + try: import json + except: import simplejson as json + with open(LOCAL_FILE) as f: + data = json.load(f) + try: + if data[channel_file]: + config.set_setting(name=data[channel_file], value="value", channel=channel_file) + except: pass #channel not in json if __name__ == "__main__": # Se ejecuta en cada inicio