From d2b30dfab2afe43dca8a0988b4e0835730f701ea Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Wed, 18 Mar 2020 11:55:27 +0100 Subject: [PATCH] Fix Filtri Community Channels --- specials/community.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/specials/community.py b/specials/community.py index 78724b5c..560b7adc 100644 --- a/specials/community.py +++ b/specials/community.py @@ -178,9 +178,13 @@ def peliculas(item, json='', key='', itemlist=[]): for i, option in enumerate(json): if Pagination and (pag - 1) * Pagination > i: continue # pagination - if Pagination and i >= pag * Pagination: break + if Pagination and i >= pag * Pagination: break if item.filterkey and item.filterkey in option: filterkey = [it.lower() for it in option[item.filterkey]] if type(option[item.filterkey]) == list else [option[item.filterkey].lower()] + else: + filterkey = [] + + title = option['title'] if 'title' in option else '' if 'tvshows_list' in key: @@ -277,16 +281,16 @@ def episodios(item, json ='', key='', itemlist =[]): # set variable ep = 1 season = infoLabels['season'] if 'season' in infoLabels else item.contentSeason if item.contentSeason else 1 - + if inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'search']: Pagination = int(defp) if defp.isdigit() else '' else: Pagination = '' pag = item.page if item.page else 1 - + # make items for i, option in enumerate(json): if Pagination and (pag - 1) * Pagination > i: continue # pagination - if Pagination and i >= pag * Pagination: break + if Pagination and i >= pag * Pagination: break # build numeration of episodes numeration = option['number'] if 'number' in option else option['title'] match = support.match(numeration , patron=r'(?P\d+)x(?P\d+)').match