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