mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-08 00:46:57 +08:00
fix themoviedb api
This commit is contained in:
@@ -45,3 +45,41 @@ class Company(TMDb):
|
||||
params="page=%s" % page,
|
||||
key="results"
|
||||
)
|
||||
|
||||
# 异步版本方法
|
||||
async def async_details(self, company_id):
|
||||
"""
|
||||
Get a companies details by id.(异步版本)
|
||||
:param company_id: int
|
||||
:return:
|
||||
"""
|
||||
return await self._async_request_obj(self._urls["details"] % company_id)
|
||||
|
||||
async def async_alternative_names(self, company_id):
|
||||
"""
|
||||
Get the alternative names of a company.(异步版本)
|
||||
:param company_id: int
|
||||
:return:
|
||||
"""
|
||||
return await self._async_request_obj(self._urls["alternative_names"] % company_id, key="results")
|
||||
|
||||
async def async_images(self, company_id):
|
||||
"""
|
||||
Get the alternative names of a company.(异步版本)
|
||||
:param company_id: int
|
||||
:return:
|
||||
"""
|
||||
return await self._async_request_obj(self._urls["images"] % company_id, key="logos")
|
||||
|
||||
async def async_movies(self, company_id, page=1):
|
||||
"""
|
||||
Get the movies of a company by id.(异步版本)
|
||||
:param company_id: int
|
||||
:param page: int
|
||||
:return:
|
||||
"""
|
||||
return await self._async_request_obj(
|
||||
self._urls["movies"] % company_id,
|
||||
params="page=%s" % page,
|
||||
key="results"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user