diff --git a/README.md b/README.md index 3a77541..eb4af21 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/package.json b/package.json index 0dba855..17868bf 100644 --- a/package.json +++ b/package.json @@ -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": "自定义文件类型从源目录复制到目的目录" } }, diff --git a/plugins/filecopy/__init__.py b/plugins/filecopy/__init__.py index 53e0485..9b4a03a 100644 --- a/plugins/filecopy/__init__.py +++ b/plugins/filecopy/__init__.py @@ -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: