From 3bfe2ed5ead4d5ba50f8135713e699db84752e6f Mon Sep 17 00:00:00 2001 From: thsrite Date: Wed, 20 Aug 2025 18:18:43 +0800 Subject: [PATCH] =?UTF-8?q?fix=20Emby=E5=BC=B9=E5=B9=95=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=20v1.8=20=E6=B2=A1=E6=9C=89=E5=BC=B9=E5=B9=95=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=B6=85=E8=BF=873=E6=AC=A1=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E8=B7=B3=E8=BF=87=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.v2.json | 3 ++- plugins.v2/embydanmu/__init__.py | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/package.v2.json b/package.v2.json index b02b5e6..a776f59 100644 --- a/package.v2.json +++ b/package.v2.json @@ -135,11 +135,12 @@ "name": "Emby弹幕下载", "description": "通知Emby Danmu插件下载弹幕。", "labels": "Emby,媒体库", - "version": "1.7", + "version": "1.8", "icon": "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/danmu.png", "author": "thsrite", "level": 1, "history": { + "v1.8": "没有弹幕新增超过3次直接跳过检查", "v1.7": "增加是否自动禁用媒体库danmu插件开关(默认False)", "v1.6": "增加Emby、MoviePilot目录映射(相同可不填)", "v1.5.1": "Emby4.8.8 Items API修改", diff --git a/plugins.v2/embydanmu/__init__.py b/plugins.v2/embydanmu/__init__.py index 7cb11a8..374c635 100644 --- a/plugins.v2/embydanmu/__init__.py +++ b/plugins.v2/embydanmu/__init__.py @@ -20,7 +20,7 @@ class EmbyDanmu(_PluginBase): # 插件图标 plugin_icon = "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/danmu.png" # 插件版本 - plugin_version = "1.7" + plugin_version = "1.8" # 插件作者 plugin_author = "thsrite" # 作者主页 @@ -597,7 +597,9 @@ class EmbyDanmu(_PluginBase): else: retry_cnt = len(season_items) _downloaded_danmu_files = [] - while len(_downloaded_danmu_files) < len(season_items) and retry_cnt > 0: + # 没有新增弹幕充实3次直接跳过 + _no_incre_cnt = 0 + while len(_downloaded_danmu_files) < len(season_items) and retry_cnt > 0 and _no_incre_cnt <= 3: # 解析日志判断是否全部失败 if self.__check_all_failed_by_log(item_name=item_info.get("SeriesName"), item_year=item_info.get("ProductionYear")): @@ -609,6 +611,9 @@ class EmbyDanmu(_PluginBase): if danmu_file.name not in _downloaded_danmu_files: _downloaded_danmu_files.append(danmu_file.name) logger.info(f"已下载弹幕文件:{danmu_file.name}") + _no_incre_cnt = 0 + else: + _no_incre_cnt += 1 # 判断是否完成任务 if len(_downloaded_danmu_files) != len(season_items): retry_cnt -= 1