fix: 修复演员detail信息不存在问题

This commit is contained in:
Carol 2023-09-09 10:30:50 +08:00
parent 1eb272077a
commit b600691df6
2 changed files with 31 additions and 28 deletions

View File

@ -28,6 +28,7 @@ def __execute(log, dir_path, output, tmdb_token, language="zh-CN"):
__nfo_data = Analyze(file_path=__file_path).analyze()
for __actor in __nfo_data["actors"]:
log.logger.warn("当前解析的演员信息: {0}".format(__actor))
if "tmdbid" in __actor.keys():
__tmdbid = __actor["tmdbid"]
__actor_name = __actor["name"]
__name = __actor_name[0].lower()

View File

@ -38,6 +38,8 @@ class Tmdb:
return "{}"
def get_actor_image(self):
ac_json = json.loads(self.get_actor_info())
if len(ac_json.keys()) > 0:
image_path = json.loads(self.get_actor_info())["profile_path"]
self.log.logger.info("当前刮削到的演员海报路径:{0}".format(image_path))
if None is not image_path: