|
|
|
@ -7,7 +7,7 @@ from urllib.parse import urlparse
|
|
|
|
|
logger = util.logger
|
|
|
|
|
|
|
|
|
|
builders = ["mdblist_list"]
|
|
|
|
|
sort_names = ["rank", "score", "released", "imdbrating", "imdbvotes", "imdbpopular", "tmdbpopular", "rogerebert", "rtomatoes", "metacritic", "myanimelist", "budget", "revenue", "added"]
|
|
|
|
|
sort_names = ["rank", "score", "score_average", "released", "imdbrating", "imdbvotes", "imdbpopular", "tmdbpopular", "rogerebert", "rtomatoes", "metacritic", "myanimelist", "budget", "revenue", "added"]
|
|
|
|
|
list_sorts = [f"{s}.asc" for s in sort_names] + [f"{s}.desc" for s in sort_names]
|
|
|
|
|
base_url = "https://mdblist.com/lists"
|
|
|
|
|
api_url = "https://mdblist.com/api/"
|
|
|
|
@ -37,6 +37,7 @@ class MDbObj:
|
|
|
|
|
self.tmdb_rating = None
|
|
|
|
|
self.letterboxd_rating = None
|
|
|
|
|
self.myanimelist_rating = None
|
|
|
|
|
self.score_average_rating = None
|
|
|
|
|
for rating in data["ratings"]:
|
|
|
|
|
if rating["source"] == "imdb":
|
|
|
|
|
self.imdb_rating = util.check_num(rating["value"], is_int=False)
|
|
|
|
@ -56,6 +57,8 @@ class MDbObj:
|
|
|
|
|
self.letterboxd_rating = util.check_num(rating["value"], is_int=False)
|
|
|
|
|
elif rating["source"] == "myanimelist":
|
|
|
|
|
self.myanimelist_rating = util.check_num(rating["value"], is_int=False)
|
|
|
|
|
elif rating["source"] == "average":
|
|
|
|
|
self.score_average_rating = util.check_num(rating["value"], is_int=False)
|
|
|
|
|
self.content_rating = data["certification"]
|
|
|
|
|
self.commonsense = data["commonsense"]
|
|
|
|
|
|
|
|
|
|