mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -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
|
||||
for x in results
|
||||
if ("name" in x and x["name"] == name)
|
||||
or ("title" in x and x["title"] == name)
|
||||
if ("name" in x and x["name"].casefold() == name.casefold())
|
||||
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,
|
||||
)
|
||||
if res:
|
||||
|
Loading…
x
Reference in New Issue
Block a user