媒体库服务器通知:查询剧集图片兼容没有季集信息的情况

This commit is contained in:
qiaoyun680
2025-06-09 16:33:32 +08:00
parent a87a31c6d8
commit 63c67a5536
2 changed files with 9 additions and 7 deletions

View File

@@ -81,11 +81,12 @@
"name": "媒体库服务器通知",
"description": "发送Emby/Jellyfin/Plex服务器的播放、入库等通知消息。",
"labels": "消息通知,媒体库",
"version": "1.5",
"version": "1.6",
"icon": "mediaplay.png",
"author": "jxxghp",
"level": 1,
"history": {
"v1.6": "查询剧集图片兼容没有季集信息的情况",
"v1.5": "支持独立控制媒体服务器通知",
"v1.4": "MoviePilot V2 版本媒体库服务器通知插件"
}

View File

@@ -18,7 +18,7 @@ class MediaServerMsg(_PluginBase):
# 插件图标
plugin_icon = "mediaplay.png"
# 插件版本
plugin_version = "1.5"
plugin_version = "1.6"
# 插件作者
plugin_author = "jxxghp"
# 作者主页
@@ -318,15 +318,16 @@ class MediaServerMsg(_PluginBase):
# 消息图片
image_url = event_info.image_url
# 查询剧集图片
if (event_info.tmdb_id
and event_info.season_id
and event_info.episode_id):
if event_info.tmdb_id:
season_id = event_info.season_id if event_info.season_id else None
episode_id = event_info.episode_id if event_info.episode_id else None
specific_image = self.chain.obtain_specific_image(
mediaid=event_info.tmdb_id,
mtype=MediaType.TV,
image_type=MediaImageType.Backdrop,
season=event_info.season_id,
episode=event_info.episode_id
season=season_id,
episode=episode_id
)
if specific_image:
image_url = specific_image