diff --git a/channels.json b/channels.json new file mode 100644 index 00000000..53f1eb08 --- /dev/null +++ b/channels.json @@ -0,0 +1,52 @@ +{ + "altadefinizione01_club": "https://www.altadefinizione01.cc", + "altadefinizione01_link": "http://altadefinizione01.link", + "altadefinizione01": "https://altadefinizione01.to", + "altadefinizioneclick": "https://altadefinizione.cloud", + + "altadefinizioneclub": "https://altadefinizione.cloud", + "altadefinizionehd": "https://altadefinizionehd.org", + "animeforge": "https://ww1.animeforce.org", + "animeleggendari": "https://animepertutti.com", + "animestream": "https://www.animeworld.it", + "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/", + "cineblog01": "https://cb01.tools", + "documentaristreamingdb": "https://documentari-streaming-da.com", + "downloadme": "https://www.downloadme.gratis", + "dragonballforever": "https://www.dragonballforever.it", + "dreamsub": "https://www.dreamsub.stream", + "eurostreaming": "https://eurostreaming.gratis", + "eurostreaming_video": "https://www.eurostreaming.best", + "fastsubita": "http://fastsubita.com", + "ffilms":"https://ffilms.org", + "filmgratis": "https://www.filmaltadefinizione.net", + "filmontv": "https://www.comingsoon.it", + "filmpertutti": "https://www.filmpertutti.tube", + "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", + "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", + "italiafilmvedohd": "https://italiafilm.info", + "italiaserie_uno": "https:://italiaserie.org", + "majintoon": "https://toonitalia.org", + "mondoserietv": "https://mondoserietv.com", + "piratestreaming": "https://www.piratestreaming.watch", + "seriehd": "https://www.seriehd.info", + "serietvonline": "https://serietvonline.xyz", + "serietvu": "https://www.serietvu.club", + "tantifilm": "https://www.tantifilm.plus" +} diff --git a/channels/altadefinizione01.py b/channels/altadefinizione01.py index 89698cd7..a9f17b5e 100644 --- a/channels/altadefinizione01.py +++ b/channels/altadefinizione01.py @@ -9,7 +9,10 @@ from platformcode import logger, config from specials import autoplay #URL che reindirizza sempre al dominio corrente -host = "https://altadefinizione01.to" +#host = "https://altadefinizione01.to" + +__channel__ = "altadefinizione01" +host = config.get_addon_version(__channel__) IDIOMAS = {'Italiano': 'IT'} list_language = IDIOMAS.values() diff --git a/channels/altadefinizione01_club.py b/channels/altadefinizione01_club.py index 3185eaa4..b24bf0b2 100644 --- a/channels/altadefinizione01_club.py +++ b/channels/altadefinizione01_club.py @@ -12,10 +12,7 @@ from platformcode import config, logger from specials import autoplay, filtertools __channel__ = "altadefinizione01_club" - -#host = "https://www.altadefinizione01.club/" # host da cambiare -#host = "https://www.altadefinizione01.team/" #aggiornato al 22 marzo 2019 -host = "https://www.altadefinizione01.vision/" #aggiornato al 30-04-209 +host = config.get_channel_url(__channel__) # ======== Funzionalità ============================= diff --git a/channels/altadefinizione01_link.py b/channels/altadefinizione01_link.py index 55f4f1c5..a779c9bc 100644 --- a/channels/altadefinizione01_link.py +++ b/channels/altadefinizione01_link.py @@ -13,19 +13,13 @@ from platformcode import config, logger __channel__ = "altadefinizione01_link" -#host = "https://altadefinizione01.link/" #riaggiornato al 29 aprile 2019 -#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 - # ======== def per utility INIZIO ============================ list_servers = ['supervideo', 'streamcherry','rapidvideo', 'streamango', 'openload'] list_quality = ['default'] -host = config.get_setting("channel_host", __channel__) +#host = config.get_setting("channel_host", __channel__) +host = config.get_channel_url(__channel__) checklinks = config.get_setting('checklinks', __channel__) checklinks_number = config.get_setting('checklinks_number', __channel__) diff --git a/channels/altadefinizioneclick.py b/channels/altadefinizioneclick.py index d7bba04a..e4db4965 100644 --- a/channels/altadefinizioneclick.py +++ b/channels/altadefinizioneclick.py @@ -10,7 +10,9 @@ from core.item import Item from platformcode import logger, config from specials import autoplay -host = config.get_setting("channel_host", 'altadefinizioneclick') +#host = config.get_setting("channel_host", 'altadefinizioneclick') +__channel__ = 'altadefinizioneclick' +host = config.get_channel_url(__channel__) IDIOMAS = {'Italiano': 'IT'} list_language = IDIOMAS.values() diff --git a/custom_code.json b/custom_code.json new file mode 100644 index 00000000..b5e1c649 --- /dev/null +++ b/custom_code.json @@ -0,0 +1,3 @@ +{ + "addon_version": "0.3" +} \ No newline at end of file diff --git a/platformcode/config.py b/platformcode/config.py index bd1f0684..9adcddd2 100644 --- a/platformcode/config.py +++ b/platformcode/config.py @@ -82,6 +82,22 @@ def is_xbmc(): def get_videolibrary_support(): return True +def get_channel_url(name): + try: + try: + import json + except: + import simplejson as json + ROOT_DIR = xbmc.translatePath(__settings__.getAddonInfo('Path')) + LOCAL_FILE = os.path.join(ROOT_DIR, "channels.json") + with open(LOCAL_FILE) as f: + data = json.load(f) + if data[name] is not None: + return data[name] + else: + return get_setting("channel_host", name) + except: + return get_setting("channel_host", name) def get_system_platform(): """ fonction: pour recuperer la platform que xbmc tourne """ diff --git a/videolibrary_service.py b/videolibrary_service.py index 4c45e60c..18f64e10 100644 --- a/videolibrary_service.py +++ b/videolibrary_service.py @@ -309,12 +309,22 @@ def monitor_update(): logger.info("Inicio actualizacion programada para las %s h.: %s" % (update_start, datetime.datetime.now())) 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')) + 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 __name__ == "__main__": # Se ejecuta en cada inicio import xbmc import time + get_channel_json() # modo adulto: # sistema actual 0: Nunca, 1:Siempre, 2:Solo hasta que se reinicie Kodi