fix 增加log显示

This commit is contained in:
thsrite
2024-08-14 10:21:46 +08:00
parent 73118ba404
commit 53247a6128
3 changed files with 6 additions and 5 deletions

View File

@@ -47,6 +47,6 @@ MoviePilot三方插件市场https://github.com/thsrite/MoviePilot-Plugins/
- 云盘同步删除 v1.5.3
- 媒体库重复媒体检测 v1.9
- 演员作品订阅 v1.0
- 文件复制 v1.0
- 文件复制 v1.1
- Emby合集媒体排序 v1.1
- 影视将映订阅 v1.1

View File

@@ -678,11 +678,12 @@
"name": "文件复制",
"description": "自定义文件类型从源目录复制到目的目录。",
"labels": "工具",
"version": "1.0",
"version": "1.1",
"icon": "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/copy_files.png",
"author": "thsrite",
"level": 1,
"history": {
"v1.1": "增加log显示",
"v1.0": "自定义文件类型从源目录复制到目的目录"
}
},

View File

@@ -25,7 +25,7 @@ class FileCopy(_PluginBase):
# 插件图标
plugin_icon = "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/copy_files.png"
# 插件版本
plugin_version = "1.0"
plugin_version = "1.1"
# 插件作者
plugin_author = "thsrite"
# 作者主页
@@ -139,8 +139,8 @@ class FileCopy(_PluginBase):
if Path(cloud_file).exists():
logger.info(f"{cloud_file} 文件已存在,跳过")
continue
state, _ = SystemUtils.copy(file, Path(cloud_file))
print(f"{file} -> {cloud_file} {'成功' if state == 0 else '失败'}")
state, error = SystemUtils.copy(file, Path(cloud_file))
logger.info(f"{file} -> {cloud_file} {'成功' if state == 0 else '失败'} {error}")
# 随机延时
if self._delay: