fix themoviedb api

This commit is contained in:
jxxghp
2025-07-31 08:40:24 +08:00
parent 8b708e8939
commit ca51880798
8 changed files with 297 additions and 1 deletions
@@ -20,6 +20,18 @@ class Change(TMDb):
key="results"
)
async def _async_change_list(self, change_type, start_date="", end_date="", page=1):
params = "page=%s" % page
if start_date:
params += "&start_date=%s" % start_date
if end_date:
params += "&end_date=%s" % end_date
return await self._async_request_obj(
self._urls[change_type],
params=params,
key="results"
)
def movie_change_list(self, start_date="", end_date="", page=1):
"""
Get the changes for a movie. By default only the last 24 hours are returned.
@@ -31,6 +43,17 @@ class Change(TMDb):
"""
return self._change_list("movie", start_date=start_date, end_date=end_date, page=page)
async def async_movie_change_list(self, start_date="", end_date="", page=1):
"""
Get the changes for a movie. By default only the last 24 hours are returned.(异步版本)
You can query up to 14 days in a single query by using the start_date and end_date query parameters.
:param start_date: str
:param end_date: str
:param page: int
:return:
"""
return await self._async_change_list("movie", start_date=start_date, end_date=end_date, page=page)
def tv_change_list(self, start_date="", end_date="", page=1):
"""
Get a list of all of the TV show ids that have been changed in the past 24 hours.
@@ -42,6 +65,17 @@ class Change(TMDb):
"""
return self._change_list("tv", start_date=start_date, end_date=end_date, page=page)
async def async_tv_change_list(self, start_date="", end_date="", page=1):
"""
Get a list of all of the TV show ids that have been changed in the past 24 hours.(异步版本)
You can query up to 14 days in a single query by using the start_date and end_date query parameters.
:param start_date: str
:param end_date: str
:param page: int
:return:
"""
return await self._async_change_list("tv", start_date=start_date, end_date=end_date, page=page)
def person_change_list(self, start_date="", end_date="", page=1):
"""
Get a list of all of the person ids that have been changed in the past 24 hours.
@@ -52,3 +86,14 @@ class Change(TMDb):
:return:
"""
return self._change_list("person", start_date=start_date, end_date=end_date, page=page)
async def async_person_change_list(self, start_date="", end_date="", page=1):
"""
Get a list of all of the person ids that have been changed in the past 24 hours.(异步版本)
You can query up to 14 days in a single query by using the start_date and end_date query parameters.
:param start_date: str
:param end_date: str
:param page: int
:return:
"""
return await self._async_change_list("person", start_date=start_date, end_date=end_date, page=page)