From 5b04ccffc3725f7327e8f7f0abb2025ffefebd08 Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Mon, 20 Jan 2020 19:37:44 +0100 Subject: [PATCH 1/3] Fix Pagina Successiva AnimeUnity --- core/support.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/support.py b/core/support.py index 1b6dd4bb..909ae0a0 100755 --- a/core/support.py +++ b/core/support.py @@ -420,6 +420,9 @@ def scrape(func): if 'itemlistHook' in args: itemlist = args['itemlistHook'](itemlist) + if 'fullItemlistHook' in args: + itemlist = args['fullItemlistHook'](itemlist) + if (pagination and len(matches) <= pag * pagination) or not pagination: # next page with pagination if patronNext and inspect.stack()[1][3] != 'newest': nextPage(itemlist, item, data, patronNext, function) @@ -458,8 +461,7 @@ def scrape(func): if 'patronMenu' in args and itemlist: itemlist = thumb(itemlist, genre=True) - if 'fullItemlistHook' in args: - itemlist = args['fullItemlistHook'](itemlist) + # itemlist = filterLang(item, itemlist) # causa problemi a newest @@ -967,7 +969,7 @@ def nextPage(itemlist, item, data='', patron='', function_or_level=1, next_page= if next_page != "": if resub: next_page = re.sub(resub[0], resub[1], next_page) if 'http' not in next_page: - next_page = scrapertools.find_single_match(item.url, 'https?://[a-z0-9.-]+') + next_page + next_page = scrapertools.find_single_match(item.url, 'https?://[a-z0-9.-]+') + (next_page if next_page.startswith('/') else '/' + next_page) next_page = re.sub('&', '&',next_page) log('NEXT= ', next_page) itemlist.append( From b1c34af71c025d8a839feec3cd17a5b3fc90973d Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Mon, 20 Jan 2020 20:11:50 +0100 Subject: [PATCH 2/3] Nascondi Server da menu AutoPlay del canale --- core/support.py | 2 +- specials/autoplay.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/core/support.py b/core/support.py index 36634e09..7e1246ee 100755 --- a/core/support.py +++ b/core/support.py @@ -1045,7 +1045,7 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True): channel_node = autoplay_node.get(item.channel, {}) settings_node = channel_node.get('settings', {}) AP = get_setting('autoplay') or settings_node['active'] - HS = config.get_setting('hide_servers') + HS = config.get_setting('hide_servers') or settings_node['hide_servers'] if CL and not AP: if get_setting('checklinks', item.channel): diff --git a/specials/autoplay.py b/specials/autoplay.py index cff4ecf9..7a11f281 100644 --- a/specials/autoplay.py +++ b/specials/autoplay.py @@ -409,6 +409,7 @@ def init(channel, list_servers, list_quality, reset=False): "quality": list_quality, "settings": { "active": False, + "hide_servers": False, "plan_b": True, "custom_servers": False, "custom_quality": False, @@ -498,16 +499,24 @@ def autoplay_config(item): active_settings = {"id": "active", "label": config.get_localized_string(60079), "type": "bool", "default": False, "enabled": allow_option, "visible": allow_option} + list_controls.append(active_settings) dict_values['active'] = settings_node.get('active', False) + hide_servers = {"id": "hide_servers", "label": config.get_localized_string(70747), + "type": "bool", "default": False, "enabled": "eq(-1,true)", + "visible": allow_option} + + list_controls.append(hide_servers) + dict_values['hide_servers'] = settings_node.get('hide_servers', False) + # Idioma status_language = config.get_setting("filter_languages", item.from_channel) if not status_language: status_language = 0 set_language = {"id": "language", "label": config.get_localized_string(60080), - "type": "list", "default": 0, "enabled": "eq(-1,true)", "visible": True, + "type": "list", "default": 0, "enabled": "eq(-2,true)", "visible": True, "lvalues": get_languages(item.from_channel)} list_controls.append(set_language) From 019d4c0ee173fc54f06a5b4b1411da82cfa1f203 Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Mon, 20 Jan 2020 20:31:47 +0100 Subject: [PATCH 3/3] Fix Nascondi Server da menu AutoPlay del canale --- core/support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/support.py b/core/support.py index 7e1246ee..53d58836 100755 --- a/core/support.py +++ b/core/support.py @@ -1045,7 +1045,7 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True): channel_node = autoplay_node.get(item.channel, {}) settings_node = channel_node.get('settings', {}) AP = get_setting('autoplay') or settings_node['active'] - HS = config.get_setting('hide_servers') or settings_node['hide_servers'] + HS = config.get_setting('hide_servers') or (settings_node['hide_servers'] if settings_node.has_key('hide_server') else False) if CL and not AP: if get_setting('checklinks', item.channel):