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
+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: