Merge branch 'stable' of https://github.com/kodiondemand/addon into stable

This commit is contained in:
Alhaziel01
2020-11-09 11:17:46 +01:00
6 changed files with 24 additions and 11 deletions

View File

@@ -6,6 +6,7 @@
"cineblog01": "https://cb01.uno",
"eurostreaming": "https://eurostreaming.link",
"film4k": "https://film4k-nuovo.link",
"filmpertutti": "https://filmpertutti.nuovo.live",
"ilcorsaronero": "https://lagazzettadelcorsaro.com",
"seriehd": "https://nuovoindirizzo.info/seriehd/",
"serietvonline": "https://serietvonline.online",
@@ -32,7 +33,6 @@
"fastsubita": "https://fastsubita.uno",
"filmgratis": "https://www.filmaltadefinizione.co",
"filmigratis": "https://filmigratis.org",
"filmpertutti": "https://www.filmpertutti.voto",
"filmsenzalimiticc": "https://www.filmsenzalimiti01.club",
"filmstreaming01": "https://filmstreaming01.com",
"guardaserie_stream": "https://guardaserie.host",

View File

@@ -99,7 +99,7 @@ def search(item, texto):
support.info("search ", texto)
item.args = 'search'
item.url = host + "/?s=" + texto
item.url = host + "/search/" + texto
try:
return peliculas(item)
# Continua la ricerca in caso di errore

View File

@@ -7,12 +7,12 @@ from core import httptools, support
from core.item import Item
from platformcode import config
# def findhost(url):
# page = httptools.downloadpage("https://filmpertutti.nuovo.live/").data
# url = scrapertools.find_single_match(page, 'Il nuovo indirizzo di FILMPERTUTTI è <a href="([^"]+)')
# return url
def findhost(url):
page = httptools.downloadpage(url).data
url = support.scrapertools.find_single_match(page, 'Il nuovo indirizzo di FILMPERTUTTI è <a href="([^"]+)')
return url
host = config.get_channel_url()
host = config.get_channel_url(findhost)
headers = [['Referer', host]]

View File

@@ -444,7 +444,7 @@ def scrape(func):
data = data.replace('\n', ' ')
data = data.replace('\t', ' ')
data = data.replace('&nbsp;', ' ')
data = re.sub(r'>\s+<', '> <', data)
data = re.sub(r'>\s{2,}<', '> <', data)
# replace all ' with " and eliminate newline, so we don't need to worry about
scrapingTime = time()
if patronBlock:

View File

@@ -72,9 +72,19 @@ def run(item=None):
else:
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(silent=False)
config.set_setting('show_once', True)
if not config.get_all_settings_addon():
logger.error('corrupted settings.xml!!')
settings_xml = os.path.join(config.get_data_path(), "settings.xml")
settings_bak = os.path.join(config.get_data_path(), "settings.bak")
if filetools.exists(settings_bak):
filetools.copy(settings_bak, settings_xml, True)
logger.info('restored settings.xml from backup')
else:
filetools.write(settings_xml, '<settings version="2">\n</settings>') # resetted settings
else:
from platformcode import xbmc_videolibrary
xbmc_videolibrary.ask_set_content(silent=False)
config.set_setting('show_once', True)
logger.info(item.tostring())

View File

@@ -326,6 +326,9 @@ class AddonMonitor(xbmc.Monitor):
def onSettingsChanged(self):
logger.debug('settings changed')
settings_post = config.get_all_settings_addon()
if settings_post: # backup settings
filetools.copy(os.path.join(config.get_data_path(), "settings.xml"),
os.path.join(config.get_data_path(), "settings.bak"), True)
from platformcode import xbmc_videolibrary
if self.settings_pre.get('downloadpath', None) != settings_post.get('downloadpath', None):