mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 12:14:46 -04:00
Fix tmdb search popularity filter (#521)
This commit is contained in:
parent
b28df77237
commit
d744235141
@ -547,7 +547,7 @@ class TheMovieDatabase(Provider):
|
|||||||
# Ignore totally unpopular shows or unknown ones.
|
# 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.
|
# sorted is stable and False<True so doing this puts baddly rated items at the end of the list.
|
||||||
results = sorted(
|
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]
|
return results[0]
|
||||||
|
@ -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.
|
# 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(
|
def sort_translations(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user