mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-03-27 10:05:57 +00:00
fix
This commit is contained in:
@@ -27,12 +27,13 @@
|
||||
"name": "云盘Strm生成(增量版)",
|
||||
"description": "监控文件创建,生成Strm文件(增量版)。",
|
||||
"labels": "云盘",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"icon": "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/create.png",
|
||||
"author": "thsrite",
|
||||
"level": 1,
|
||||
"v2": true,
|
||||
"history": {
|
||||
"v1.1.4": "fix",
|
||||
"v1.1.3": "支持[目录实时监控]插件联动",
|
||||
"v1.1.2": "增量文件可选择是否保留",
|
||||
"v1.1.1": "写入strm使用utf-8编码",
|
||||
|
||||
@@ -25,7 +25,7 @@ class CloudStrmIncrement(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/create.png"
|
||||
# 插件版本
|
||||
plugin_version = "1.1.3"
|
||||
plugin_version = "1.1.4"
|
||||
# 插件作者
|
||||
plugin_author = "thsrite"
|
||||
# 作者主页
|
||||
@@ -231,13 +231,17 @@ class CloudStrmIncrement(_PluginBase):
|
||||
# 移动后文件
|
||||
source_file = increment_file.replace(increment_dir, source_dir)
|
||||
|
||||
logger.info(f"移动后增量文件 {source_file}")
|
||||
|
||||
# 判断目标文件是否存在
|
||||
if not Path(source_file).parent.exists():
|
||||
Path(source_file).parent.mkdir(parents=True, exist_ok=True)
|
||||
Path(source_file).mkdir(parents=True, exist_ok=True)
|
||||
logger.info(f"创建增量文件父目录 {str(Path(source_file).parent)}")
|
||||
|
||||
if self._del_source:
|
||||
shutil.move(increment_file, source_file, copy_function=shutil.copy2)
|
||||
shutil.copy2(increment_file, source_file)
|
||||
logger.info(f"移动增量文件 {increment_file} 到 {source_file}")
|
||||
Path(increment_file).unlink()
|
||||
else:
|
||||
shutil.copy2(increment_file, source_file)
|
||||
logger.info(f"复制增量文件 {increment_file} 到 {source_file}")
|
||||
|
||||
Reference in New Issue
Block a user