fix Emby弹幕下载 v1.8

没有弹幕新增超过3次直接跳过检查
This commit is contained in:
thsrite
2025-08-20 18:18:43 +08:00
parent e7fcbe5790
commit 3bfe2ed5ea
2 changed files with 9 additions and 3 deletions

View File

@@ -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修改",

View File

@@ -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