fix scrape api

This commit is contained in:
jxxghp
2024-06-21 19:19:10 +08:00
parent f9f4d97a51
commit e0a251b339
8 changed files with 198 additions and 53 deletions

View File

@@ -216,14 +216,18 @@ class TheMovieDbModule(_ModuleBase):
tmdbid=info.get("id"))
return info
def tmdb_info(self, tmdbid: int, mtype: MediaType) -> Optional[dict]:
def tmdb_info(self, tmdbid: int, mtype: MediaType, season: int = None) -> Optional[dict]:
"""
获取TMDB信息
:param tmdbid: int
:param mtype: 媒体类型
:param season: 季号
:return: TVDB信息
"""
return self.tmdb.get_info(mtype=mtype, tmdbid=tmdbid)
if not season:
return self.tmdb.get_info(mtype=mtype, tmdbid=tmdbid)
else:
return self.tmdb.get_tv_season_detail(tmdbid=tmdbid, season=season)
def media_category(self) -> Optional[Dict[str, list]]:
"""