miglioria match tmdb su cinemalibero
This commit is contained in:
@@ -77,6 +77,8 @@ def peliculas(item):
|
|||||||
item.title += support.typo(item.lang2, '_ [] color kod')
|
item.title += support.typo(item.lang2, '_ [] color kod')
|
||||||
if item.args == 'update':
|
if item.args == 'update':
|
||||||
item.title = item.title.replace('-', ' ')
|
item.title = item.title.replace('-', ' ')
|
||||||
|
if item.args == 'search':
|
||||||
|
item.contentType = 'tvshow' if 'serie-' in item.url else 'movie'
|
||||||
|
|
||||||
return item
|
return item
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1021,7 +1021,7 @@ class Tmdb(object):
|
|||||||
# We sort result based on fuzzy match to detect most similar
|
# We sort result based on fuzzy match to detect most similar
|
||||||
if len(results) > 1:
|
if len(results) > 1:
|
||||||
from lib.fuzzy_match import algorithims
|
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
|
# We return the number of results of this page
|
||||||
self.results = results
|
self.results = results
|
||||||
|
|||||||
Reference in New Issue
Block a user