mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-06-09 07:26:50 +00:00
fix 修改若看参数名,具体看教程
This commit is contained in:
@@ -4,6 +4,28 @@
|
||||
|
||||
提供四种方式,具体看示例
|
||||
|
||||
{
|
||||
"transfer_type": "copy/move",
|
||||
"return_mode": "softlink",
|
||||
"monitor_dirs": [
|
||||
{
|
||||
"monitor_mode": "监控模式 compatibility/fast",
|
||||
`"dest_path": "/mnt/link/movies",`
|
||||
"mount_path": "/mnt/cloud/115/media/movies",
|
||||
"return_path": "/mnt/softlink/movies",
|
||||
`"delete_dest": "false",`
|
||||
`"dest_preserve_hierarchy": 0,`
|
||||
"delete_history": "false",
|
||||
`"delete_src": "false",`
|
||||
`"src_paths": "/mnt/media/movies, /mnt/media/series",`
|
||||
`"src_preserve_hierarchy": 0,`
|
||||
"only_media": "true",
|
||||
"overwrite": "false",
|
||||
"upload_cloud": "true"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
直接转移--softlink回本地
|
||||
@@ -13,16 +35,16 @@
|
||||
"monitor_dirs": [
|
||||
{
|
||||
"monitor_mode": "监控模式 compatibility/fast",
|
||||
"dest_path": "/mnt/link/movies",
|
||||
`"dest_path": "/mnt/link/movies",`
|
||||
"mount_path": "/mnt/cloud/115/media/movies",
|
||||
"return_path": "/mnt/softlink/movies",
|
||||
"delete_dest": "false",
|
||||
"dest_preserve_hierarchy": 0,
|
||||
`"delete_dest": "false",`
|
||||
`"dest_preserve_hierarchy": 0,`
|
||||
"delete_history": "false",
|
||||
"delete_src": "false",
|
||||
"src_paths": "/mnt/media/movies, /mnt/media/series",
|
||||
"src_preserve_hierarchy": 0,
|
||||
"just_media": "true",
|
||||
`"delete_src": "false",`
|
||||
`"src_paths": "/mnt/media/movies, /mnt/media/series",`
|
||||
`"src_preserve_hierarchy": 0,`
|
||||
"only_media": "true",
|
||||
"overwrite": "false",
|
||||
"upload_cloud": "true"
|
||||
}
|
||||
@@ -50,7 +72,7 @@
|
||||
"delete_src": "false",
|
||||
"src_paths": "/mnt/media/movies, /mnt/media/series",
|
||||
"src_preserve_hierarchy": 0,
|
||||
"just_media": "true",
|
||||
"only_media": "true",
|
||||
"overwrite": "false",
|
||||
"upload_cloud": "true"
|
||||
}
|
||||
@@ -77,7 +99,7 @@ cd2方式上传--softlink回本地(暂时移除)
|
||||
"delete_src": "false",
|
||||
"src_paths": "/mnt/media/movies, /mnt/media/series",
|
||||
"src_preserve_hierarchy": 0,
|
||||
"just_media": "true",
|
||||
"only_media": "true",
|
||||
"overwrite": "false",
|
||||
"upload_cloud": "true"
|
||||
}
|
||||
@@ -108,7 +130,7 @@ cd2方式上传--strm回本地(暂时移除)
|
||||
"delete_src": "false",
|
||||
"src_paths": "/mnt/media/movies, /mnt/media/series",
|
||||
"src_preserve_hierarchy": 0,
|
||||
"just_media": "true",
|
||||
"only_media": "true",
|
||||
"overwrite": "false",
|
||||
"upload_cloud": "true"
|
||||
}
|
||||
@@ -134,7 +156,7 @@ cd2方式上传--strm回本地(暂时移除)
|
||||
- src_paths:转移前的源文件路径,多个目录用逗号分隔(MoviePilot下载目录)
|
||||
- src_preserve_hierarchy:保留源文件路径目录层级,0:表示仅监控到源文件目录,1:表示监控源文件目录及其一级子目录
|
||||
-
|
||||
- just_media:是否只监控媒体文件
|
||||
- only_media:是否只监控媒体文件
|
||||
- overwrite:是否覆盖已存在云盘文件
|
||||
- upload_cloud: 是否上传到云盘, false则直接软连接或者strm回本地
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ class CloudAssistant(_PluginBase):
|
||||
"delete_src": "false",
|
||||
"src_paths": "/mnt/media/movies, /mnt/media/series",
|
||||
"src_preserve_hierarchy": 0,
|
||||
"just_media": "true",
|
||||
"only_media": "true",
|
||||
"overwrite": "false",
|
||||
"upload_cloud": "true"
|
||||
}
|
||||
@@ -341,13 +341,13 @@ class CloudAssistant(_PluginBase):
|
||||
# 遍历所有监控目录
|
||||
for mon_path in self._dirconf.keys():
|
||||
monitor_conf = self._dirconf.get(mon_path)
|
||||
just_media = monitor_conf.get("just_media") or True
|
||||
only_media = monitor_conf.get("only_media") or True
|
||||
# 遍历目录下所有文件
|
||||
for root, dirs, files in os.walk(mon_path):
|
||||
for name in dirs + files:
|
||||
file_path = os.path.join(root, name)
|
||||
if Path(str(file_path)).is_file():
|
||||
if str(just_media) == "true" and Path(str(file_path)).suffix.lower() not in [ext.strip() for ext
|
||||
if str(only_media) == "true" and Path(str(file_path)).suffix.lower() not in [ext.strip() for ext
|
||||
in
|
||||
self._rmt_mediaext.split(
|
||||
",")]:
|
||||
|
||||
Reference in New Issue
Block a user