Fix tmdb search popularity filter (#521)

This commit is contained in:
Zoe Roux 2024-05-31 18:06:18 +02:00 committed by GitHub
parent b28df77237
commit d744235141
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -547,7 +547,7 @@ class TheMovieDatabase(Provider):
# Ignore totally unpopular shows or unknown ones.
# sorted is stable and False<True so doing this puts baddly rated items at the end of the list.
results = sorted(
results, key=lambda x: x["vote_count"] < 10 or x["popularity"] < 5
results, key=lambda x: x["vote_count"] < 5 or x["popularity"] < 5
)
return results[0]

View File

@ -27,7 +27,7 @@ def normalize_lang(lang: str) -> str:
# For now, the API of kyoo only support one language so we remove the others.
default_languages = os.environ["LIBRARY_LANGUAGES"].split(",")
default_languages = os.environ.get("LIBRARY_LANGUAGES", "").split(",")
def sort_translations(