mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-03-27 10:05:57 +00:00
fix 修改参数名local_path->dest_path、source_dirs->src_paths
This commit is contained in:
@@ -13,14 +13,14 @@
|
||||
"monitor_dirs": [
|
||||
{
|
||||
"monitor_mode": "监控模式 compatibility/fast",
|
||||
"link_path": "/mnt/link/movies",
|
||||
"dest_path": "/mnt/link/movies",
|
||||
"mount_path": "/mnt/cloud/115/media/movies",
|
||||
"return_path": "/mnt/softlink/movies",
|
||||
"delete_local": "false",
|
||||
"local_preserve_hierarchy": 0,
|
||||
"delete_history": "false",
|
||||
"delete_source": "false",
|
||||
"source_paths": "/mnt/media/movies, /mnt/media/series",
|
||||
"src_paths": "/mnt/media/movies, /mnt/media/series",
|
||||
"source_preserve_hierarchy": 0,
|
||||
"just_media": "true",
|
||||
"overwrite": "false",
|
||||
@@ -36,7 +36,7 @@
|
||||
"monitor_dirs": [
|
||||
{
|
||||
"monitor_mode": "监控模式 compatibility/fast",
|
||||
"link_path": "/mnt/link/movies",
|
||||
"dest_path": "/mnt/link/movies",
|
||||
"mount_path": "/mnt/cloud/115/media/movies",
|
||||
"return_path": "/mnt/strm/movies",
|
||||
"library_dir": "/mnt/movies",
|
||||
@@ -48,7 +48,7 @@
|
||||
"local_preserve_hierarchy": 0,
|
||||
"delete_history": "false",
|
||||
"delete_source": "false",
|
||||
"source_paths": "/mnt/media/movies, /mnt/media/series",
|
||||
"src_paths": "/mnt/media/movies, /mnt/media/series",
|
||||
"source_preserve_hierarchy": 0,
|
||||
"just_media": "true",
|
||||
"overwrite": "false",
|
||||
@@ -67,7 +67,7 @@ cd2方式上传--softlink回本地(暂时移除)
|
||||
"monitor_dirs": [
|
||||
{
|
||||
"monitor_mode": "监控模式 compatibility/fast",
|
||||
"link_path": "/mnt/link/movies",
|
||||
"dest_path": "/mnt/link/movies",
|
||||
"mount_path": "/mnt/cloud/115/media/movies",
|
||||
"cd2_path": "/115/media/movies",
|
||||
"return_path": "/mnt/softlink/movies",
|
||||
@@ -75,7 +75,7 @@ cd2方式上传--softlink回本地(暂时移除)
|
||||
"local_preserve_hierarchy": 0,
|
||||
"delete_history": "false",
|
||||
"delete_source": "false",
|
||||
"source_paths": "/mnt/media/movies, /mnt/media/series",
|
||||
"src_paths": "/mnt/media/movies, /mnt/media/series",
|
||||
"source_preserve_hierarchy": 0,
|
||||
"just_media": "true",
|
||||
"overwrite": "false",
|
||||
@@ -93,7 +93,7 @@ cd2方式上传--strm回本地(暂时移除)
|
||||
"monitor_dirs": [
|
||||
{
|
||||
"monitor_mode": "监控模式 compatibility/fast",
|
||||
"link_path": "/mnt/link/movies",
|
||||
"dest_path": "/mnt/link/movies",
|
||||
"mount_path": "/mnt/cloud/115/media/movies",
|
||||
"cd2_path": "/115/media/movies",
|
||||
"return_path": "/mnt/strm/movies",
|
||||
@@ -106,7 +106,7 @@ cd2方式上传--strm回本地(暂时移除)
|
||||
"local_preserve_hierarchy": 0,
|
||||
"delete_history": "false",
|
||||
"delete_source": "false",
|
||||
"source_paths": "/mnt/media/movies, /mnt/media/series",
|
||||
"src_paths": "/mnt/media/movies, /mnt/media/series",
|
||||
"source_preserve_hierarchy": 0,
|
||||
"just_media": "true",
|
||||
"overwrite": "false",
|
||||
@@ -123,7 +123,7 @@ cd2方式上传--strm回本地(暂时移除)
|
||||
- username:cd2用户名
|
||||
- password:cd2密码
|
||||
- tranfer_type:转移类型,可选值:copy/move
|
||||
- link_path: MoviePilot本地刮削好的文件路径(MoviePilot媒体库目录)
|
||||
- dest_path: MoviePilot本地刮削好的文件路径(MoviePilot媒体库目录)
|
||||
- mount_path:MoviePilot中云盘挂载路径
|
||||
- cd2_path:cd2中云盘挂载路径
|
||||
- return_path:MoviePilot中软链接/strm生成路径
|
||||
@@ -132,7 +132,7 @@ cd2方式上传--strm回本地(暂时移除)
|
||||
- local_preserve_hierarchy:保留监控路径目录层级,例如 1:表示保留监控目录后一层目录结构,0:表示仅保留到监控目录
|
||||
- delete_history:是否删除MoviePilot中转移历史记录
|
||||
- delete_source:是否删除源文件,仅上述监控路径查询到转移记录时才生效,删除转移记录的源文件路径
|
||||
- source_paths:转移前的源文件路径,多个目录用逗号分隔(MoviePilot下载目录)
|
||||
- src_paths:转移前的源文件路径,多个目录用逗号分隔(MoviePilot下载目录)
|
||||
- source_preserve_hierarchy:保留源文件路径目录层级,0:表示仅监控到源文件目录,1:表示监控源文件目录及其一级子目录
|
||||
- just_media:是否只监控媒体文件
|
||||
- overwrite:是否覆盖已存在云盘文件
|
||||
|
||||
@@ -526,7 +526,7 @@
|
||||
"author": "thsrite",
|
||||
"level": 3,
|
||||
"history": {
|
||||
"v2.0.1": "修改参数名local_path->link_path、source_dirs->source_paths",
|
||||
"v2.0.1": "修改参数名local_path->dest_path、source_dirs->src_paths",
|
||||
"v2.0": "调整通知图片",
|
||||
"v1.9": "修复非媒体文件转移bug(需要主程序1.9.9+)",
|
||||
"v1.8": "支持可选开启实时监控",
|
||||
|
||||
@@ -110,14 +110,14 @@ class CloudAssistant(_PluginBase):
|
||||
"monitor_dirs": [
|
||||
{
|
||||
"monitor_mode": "模式 compatibility/fast",
|
||||
"link_path": "/mnt/media/movies",
|
||||
"dest_path": "/mnt/media/movies",
|
||||
"mount_path": "/mnt/cloud/115/media/movies",
|
||||
"return_path": "/mnt/softlink/movies",
|
||||
"delete_local": "false",
|
||||
"local_preserve_hierarchy": 0,
|
||||
"delete_history": "false",
|
||||
"delete_source": "false",
|
||||
"source_paths": "/mnt/media/movies, /mnt/media/series",
|
||||
"src_paths": "/mnt/media/movies, /mnt/media/series",
|
||||
"source_preserve_hierarchy": 0,
|
||||
"just_media": "true",
|
||||
"overwrite": "false",
|
||||
@@ -226,7 +226,7 @@ class CloudAssistant(_PluginBase):
|
||||
continue
|
||||
|
||||
# 读取监控目录配置
|
||||
mon_path = monitor_dir.get("link_path")
|
||||
mon_path = monitor_dir.get("dest_path")
|
||||
# 云盘挂载路径
|
||||
target_path = monitor_dir.get("mount_path")
|
||||
# 监控模式
|
||||
@@ -425,7 +425,7 @@ class CloudAssistant(_PluginBase):
|
||||
overwrite = monitor_dir.get("overwrite") or "false"
|
||||
upload_cloud = monitor_dir.get("upload_cloud") or "true"
|
||||
local_preserve_hierarchy = monitor_dir.get("local_preserve_hierarchy") or 0
|
||||
source_paths = monitor_dir.get("source_paths") or ""
|
||||
src_paths = monitor_dir.get("src_paths") or ""
|
||||
source_preserve_hierarchy = monitor_dir.get("source_preserve_hierarchy") or 0
|
||||
|
||||
# 1、转移到云盘挂载路径 上传到cd2
|
||||
@@ -515,7 +515,7 @@ class CloudAssistant(_PluginBase):
|
||||
self.__delete_local_file(file_path, mon_path, local_preserve_hierarchy)
|
||||
# 是否删除源文件
|
||||
if str(delete_source) == "true" and transferhis:
|
||||
self.__delete_source_file(transferhis, source_paths, source_preserve_hierarchy)
|
||||
self.__delete_source_file(transferhis, src_paths, source_preserve_hierarchy)
|
||||
# 发送消息汇总
|
||||
if self._notify and transferhis:
|
||||
self.__msg_handler(transferhis)
|
||||
@@ -562,7 +562,7 @@ class CloudAssistant(_PluginBase):
|
||||
logger.warn(f"删除监控空目录:{file_dir}")
|
||||
shutil.rmtree(file_dir, ignore_errors=True)
|
||||
|
||||
def __delete_source_file(self, transferhis, source_paths, source_preserve_hierarchy):
|
||||
def __delete_source_file(self, transferhis, src_paths, source_preserve_hierarchy):
|
||||
"""
|
||||
删除源文件
|
||||
"""
|
||||
@@ -584,7 +584,7 @@ class CloudAssistant(_PluginBase):
|
||||
|
||||
# 源文件保留层级
|
||||
source_path = None
|
||||
for source_dir in source_paths.split(","):
|
||||
for source_dir in src_paths.split(","):
|
||||
source_dir = source_dir.strip()
|
||||
if not source_dir:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user