diff --git a/package.json b/package.json index 32977e9..9d10110 100644 --- a/package.json +++ b/package.json @@ -394,11 +394,12 @@ "name": "演职人员刮削", "description": "刮削演职人员图片以及中文名称。", "labels": "媒体库,刮削", - "version": "1.3", + "version": "1.4", "icon": "actor.png", "author": "jxxghp", "level": 1, "history": { + "v1.4": "人物图片调整为优先从TMDB获取,避免douban图片CDN加载过慢的问题", "v1.3": "修复v1.8.5版本后刮削报错问题" } }, diff --git a/plugins/personmeta/__init__.py b/plugins/personmeta/__init__.py index e5a2cdd..1c5978c 100644 --- a/plugins/personmeta/__init__.py +++ b/plugins/personmeta/__init__.py @@ -40,7 +40,7 @@ class PersonMeta(_PluginBase): # 插件图标 plugin_icon = "actor.png" # 插件版本 - plugin_version = "1.3" + plugin_version = "1.4" # 插件作者 plugin_author = "jxxghp" # 作者主页 @@ -514,6 +514,11 @@ class PersonMeta(_PluginBase): person_detail = self.tmdbchain.person_detail(int(person_tmdbid)) if person_detail: cn_name = self.__get_chinese_name(person_detail) + # 图片优先从TMDB获取 + profile_path = person_detail.profile_path + if profile_path: + logger.debug(f"{people.get('Name')} 从TMDB获取到图片:{profile_path}") + profile_path = f"https://{settings.TMDB_IMAGE_DOMAIN}/t/p/original{profile_path}" if cn_name: # 更新中文名 logger.debug(f"{people.get('Name')} 从TMDB获取到中文名:{cn_name}") @@ -526,11 +531,6 @@ class PersonMeta(_PluginBase): logger.debug(f"{people.get('Name')} 从TMDB获取到中文描述") personinfo["Overview"] = biography updated_overview = True - # 图片 - profile_path = person_detail.profile_path - if profile_path: - logger.debug(f"{people.get('Name')} 从TMDB获取到图片:{profile_path}") - profile_path = f"https://{settings.TMDB_IMAGE_DOMAIN}/t/p/original{profile_path}" # 从豆瓣信息中更新人物信息 """