mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-03-27 10:05:57 +00:00
fix Emby剧集演员同步 v1.3 剧集优先使用季演员
This commit is contained in:
@@ -63,4 +63,4 @@ MoviePilot三方插件市场:https://github.com/thsrite/MoviePilot-Plugins/
|
||||
57. Emby视频类型检查 v1.0 `定期检查Emby媒体库中是否包含指定的视频类型,发送通知。`
|
||||
58. Emby有声书整理 v1.1 `还在为Emby有声书整理烦恼吗?入库存在很多单集?`
|
||||
59. Emby弹幕下载 v1.2 `通知Emby Danmu插件下载弹幕。`
|
||||
60. Emby剧集演员同步 v1.2 `同步剧演员信息到集演员信息。`
|
||||
60. Emby剧集演员同步 v1.3 `同步剧演员信息到集演员信息。`
|
||||
@@ -764,11 +764,12 @@
|
||||
"name": "Emby剧集演员同步",
|
||||
"description": "同步剧演员信息到集演员信息。",
|
||||
"labels": "Emby,媒体库",
|
||||
"version": "1.2",
|
||||
"version": "1.3",
|
||||
"icon": "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/embyactorsync.png",
|
||||
"author": "thsrite",
|
||||
"level": 1,
|
||||
"history": {
|
||||
"v1.3": "剧集优先使用季演员。",
|
||||
"v1.2": "交互命令返回处理完成信息。",
|
||||
"v1.1": "支持交互命令手动同步单个剧集 /as 媒体库名 剧集名。",
|
||||
"v1.0": "同步剧演员信息到集演员信息。"
|
||||
|
||||
@@ -23,7 +23,7 @@ class EmbyActorSync(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/embyactorsync.png"
|
||||
# 插件版本
|
||||
plugin_version = "1.2"
|
||||
plugin_version = "1.3"
|
||||
# 插件作者
|
||||
plugin_author = "thsrite"
|
||||
# 作者主页
|
||||
@@ -151,19 +151,21 @@ class EmbyActorSync(_PluginBase):
|
||||
item_info = self.__get_item_info(item.get("Id"))
|
||||
seasons = self.__get_items(item.get("Id"))
|
||||
for season in seasons:
|
||||
season_info = self.__get_item_info(season.get("Id"))
|
||||
peoples = season_info.get("People") or item_info.get("People")
|
||||
season_items = self.__get_items(season.get("Id"))
|
||||
for season_item in season_items:
|
||||
retry = 0
|
||||
while retry < 3:
|
||||
season_item_info = self.__get_item_info(season_item.get("Id"))
|
||||
try:
|
||||
if season_item_info.get("People") == item_info.get("People"):
|
||||
if season_item_info.get("People") == peoples:
|
||||
logger.warn(
|
||||
f"媒体:{item.get('Name')} {season_item_info.get('SeasonName')} {season_item_info.get('IndexNumber')} {season_item_info.get('Name')} 演员信息已更新")
|
||||
retry = 3
|
||||
continue
|
||||
season_item_info.update({
|
||||
"People": item_info.get("People")
|
||||
"People": peoples
|
||||
})
|
||||
season_item_info["LockedFields"].append("Cast")
|
||||
flag = self.__update_item_info(season_item.get("Id"), season_item_info)
|
||||
|
||||
Reference in New Issue
Block a user