fix cb01 (novità)

This commit is contained in:
mac12m99
2019-10-26 14:31:16 +02:00
committed by marco
parent 5340c588cb
commit 4c473d5f9a
2 changed files with 26 additions and 29 deletions
-17
View File
@@ -398,8 +398,6 @@ def scrape(func):
itemlist, matches = scrapeBlock(item, args, data, patron, headers, action, pagination, debug, typeContentDict,
typeActionDict, blacklist, search, pag, function, lang)
checkHost(item, itemlist)
if 'itemlistHook' in args:
itemlist = args['itemlistHook'](itemlist)
@@ -450,21 +448,6 @@ def scrape(func):
return wrapper
def checkHost(item, itemlist):
# nel caso non ci siano risultati puo essere che l'utente abbia cambiato manualmente l'host, pertanto lo riporta
# al valore di default (fixa anche il problema del cambio di host da parte nostra)
if len(itemlist) == 0:
# trovo il valore di default
defHost = None
for s in channeltools.get_channel_json(item.channel)['settings']:
if s['id'] == 'channel_host':
defHost = s['default']
break
# lo confronto con quello attuale
if config.get_setting('channel_host', item.channel) != defHost:
config.set_setting('channel_host', defHost, item.channel)
def dooplay_get_links(item, host):
# get links from websites using dooplay theme and dooplay_player
# return a list of dict containing these values: url, title and server