miglioria match tmdb su cinemalibero

This commit is contained in:
mac12m99
2021-02-07 13:01:53 +01:00
parent a180136f8c
commit 81a9787d06
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -1021,7 +1021,7 @@ 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['title']), reverse=True)
results.sort(key=lambda r: algorithims.trigram(text_simple, r['title'] if self.busqueda_tipo == 'movie' else r['name']), reverse=True)
# We return the number of results of this page
self.results = results