Aggiunto AltadefinizioneCommunity

This commit is contained in:
mac12m99
2021-07-18 13:38:16 +02:00
parent 3321a8a119
commit 9f1b65613a
5 changed files with 14 additions and 6 deletions
+2 -1
View File
@@ -1166,6 +1166,7 @@ def nextPage(itemlist, item, data='', patron='', function_or_level=1, next_page=
thumbnail=thumb()))
return itemlist[-1]
def pagination(itemlist, item, page, perpage, function_level=1):
if len(itemlist) >= page * perpage:
itemlist.append(
@@ -1385,7 +1386,7 @@ def get_jwplayer_mediaurl(data, srvName, onlyHttp=False, dataIsBlock=False):
from core import jsontools
video_urls = []
block = scrapertools.find_single_match(data, r'sources:\s*([^\]]+\])') if not dataIsBlock else data
block = scrapertools.find_single_match(data, r'sources"?\s*:\s*(.*?}])') if not dataIsBlock else data
if block:
json = jsontools.load(block)
if json:
+8 -2
View File
@@ -1055,7 +1055,10 @@ class Tmdb(object):
# We sort result based on fuzzy match to detect most similar
if len(results) > 1:
from lib.fuzzy_match import algorithims
results.sort(key=lambda r: algorithims.trigram(text_simple, r.get('name', '') if self.search_type == 'tv' else r.get('title', '')), reverse=True)
if self.search_type == 'multi':
results.sort(key=lambda r: algorithims.trigram(text_simple, r.get('name', '') if r.get('media_type') == 'tv' else r.get('title', '')), reverse=True)
else:
results.sort(key=lambda r: algorithims.trigram(text_simple, r.get('name', '') if self.search_type == 'tv' else r.get('title', '')), reverse=True)
# We return the number of results of this page
self.results = results
@@ -1654,7 +1657,10 @@ class Tmdb(object):
if v == "None":
continue
if k == 'overview':
if k == 'media_type':
ret_infoLabels['mediatype'] = 'tvshow' if v == 'tv' else 'movie'
elif k == 'overview':
if origen:
ret_infoLabels['plot'] = v
else: