KoD 1.7.7

- fix di routine ai canali/server\n\n
This commit is contained in:
marco
2023-06-30 19:39:03 +02:00
parent c3e02636fb
commit d29efd4ec2
68 changed files with 1784 additions and 543 deletions

View File

@@ -287,10 +287,11 @@ def downloadpage(url, **opt):
# Headers passed as parameters
if opt.get('headers', None) is not None:
opt['headers'] = dict(opt['headers'])
if not opt.get('replace_headers', False):
req_headers.update(dict(opt['headers']))
req_headers.update(opt['headers'])
else:
req_headers = dict(opt['headers'])
req_headers = opt['headers']
if domain in directIP.keys() and not opt.get('disable_directIP', False):
req_headers['Host'] = domain
@@ -429,8 +430,9 @@ def downloadpage(url, **opt):
else:
logger.debug("CF retry with proxy for domain: %s" % domain)
if not opt.get('headers'):
opt['headers'] = []
opt['headers'].extend([['Px-Host', domain], ['Px-Token', cf_proxy['token']]])
opt['headers'] = {}
opt['headers']['Px-Host'] = domain
opt['headers']['Px-Token'] = cf_proxy['token']
opt['real-url'] = url
ret = downloadpage(urlparse.urlunparse((parse.scheme, cf_proxy['url'], parse.path, parse.params, parse.query, parse.fragment)), **opt)
ret.url = url

View File

@@ -621,7 +621,7 @@ def scrape(func):
else: autorenumber.start(itemlist)
if itemlist and action != 'play' and 'patronMenu' not in args and 'patronGenreMenu' not in args \
and not stackCheck(['add_tvshow', 'get_newest']) and (function not in ['episodios', 'mainlist']
and not stackCheck(['add_tvshow', 'get_newest']) and not disabletmdb and (function not in ['episodios', 'mainlist']
or (function in ['episodios', 'seasons'] and config.get_setting('episode_info') and itemlist[0].season)):
# dbg()
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)