短剧分类调试

This commit is contained in:
LongShengWen
2024-11-20 09:41:35 +08:00
parent 2283f88bbd
commit 4dedbdd743
2 changed files with 6 additions and 3 deletions

View File

@@ -256,7 +256,7 @@
"name": "短剧自动分类",
"description": "网络短剧自动整理到独立的分类目录。",
"labels": "文件整理",
"version": "2.8",
"version": "2.9",
"icon": "Amule_A.png",
"author": "longqiuyu",
"level": 1,

View File

@@ -11,6 +11,7 @@ from app.core.event import eventmanager, Event
from app.log import logger
from app.plugins import _PluginBase
from app.schemas import TransferInfo
from app.schemas.file import FileItem
from app.schemas.types import EventType, MediaType, NotificationType
from app.utils.system import SystemUtils
@@ -25,7 +26,7 @@ class PlayletCategory_v2(_PluginBase):
# 插件图标
plugin_icon = "Amule_A.png"
# 插件版本
plugin_version = "2.8"
plugin_version = "2.9"
# 插件作者
plugin_author = "longqiuyu"
# 作者主页
@@ -230,7 +231,9 @@ class PlayletCategory_v2(_PluginBase):
logger.info("开始整理!")
# 加锁
with lock:
file_list = transferinfo.target_item.file_list_new or []
target_item: FileItem = transferinfo.target_item
logger.debug(f"target_item: {target_item}")
file_list = target_item.file_list_new or []
# 过滤掉不存在的文件
file_list = [file for file in file_list if Path(file).exists()]
if not file_list: