mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-03 05:34:23 -04:00
Sort by vote count and use case insensitive match for perfect matches
This commit is contained in:
parent
bc75576e4b
commit
3725ed89db
@ -533,10 +533,10 @@ class TheMovieDatabase(Provider):
|
|||||||
(
|
(
|
||||||
x
|
x
|
||||||
for x in results
|
for x in results
|
||||||
if ("name" in x and x["name"] == name)
|
if ("name" in x and x["name"].casefold() == name.casefold())
|
||||||
or ("title" in x and x["title"] == name)
|
or ("title" in x and x["title"].casefold() == name.casefold())
|
||||||
),
|
),
|
||||||
key=lambda x: x["popularity"],
|
key=lambda x: (x["vote_count"], x["popularity"]),
|
||||||
reverse=True,
|
reverse=True,
|
||||||
)
|
)
|
||||||
if res:
|
if res:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user