This commit is contained in:
jxxghp 2023-10-17 17:24:25 +08:00
parent bd2ef934d9
commit be4df15d01
2 changed files with 6 additions and 4 deletions

View File

@ -57,7 +57,7 @@ def manual_transfer(path: str = None,
# 源路径
in_path = Path(history.src)
# 目的路径
if history.dest:
if history.dest and str(history.dest) != "None":
# 删除旧的已整理文件
TransferChain(db).delete_files(Path(history.dest))
if not target:
@ -67,8 +67,10 @@ def manual_transfer(path: str = None,
else:
return schemas.Response(success=False, message=f"缺少参数path/logid")
if target:
if target and target != "None":
target = Path(target)
else:
target = None
# 类型
mtype = MediaType(type_name) if type_name else None

View File

@ -119,7 +119,7 @@ class TransferHistoryOper(DbOper):
"""
self.add_force(
src=str(src_path),
dest=str(transferinfo.target_path),
dest=str(transferinfo.target_path or ''),
mode=mode,
type=mediainfo.type.value,
category=mediainfo.category,
@ -145,7 +145,7 @@ class TransferHistoryOper(DbOper):
if mediainfo and transferinfo:
his = self.add_force(
src=str(src_path),
dest=str(transferinfo.target_path),
dest=str(transferinfo.target_path or ''),
mode=mode,
type=mediainfo.type.value,
category=mediainfo.category,