fix #890
This commit is contained in:
parent
bd2ef934d9
commit
be4df15d01
@ -57,7 +57,7 @@ def manual_transfer(path: str = None,
|
|||||||
# 源路径
|
# 源路径
|
||||||
in_path = Path(history.src)
|
in_path = Path(history.src)
|
||||||
# 目的路径
|
# 目的路径
|
||||||
if history.dest:
|
if history.dest and str(history.dest) != "None":
|
||||||
# 删除旧的已整理文件
|
# 删除旧的已整理文件
|
||||||
TransferChain(db).delete_files(Path(history.dest))
|
TransferChain(db).delete_files(Path(history.dest))
|
||||||
if not target:
|
if not target:
|
||||||
@ -67,8 +67,10 @@ def manual_transfer(path: str = None,
|
|||||||
else:
|
else:
|
||||||
return schemas.Response(success=False, message=f"缺少参数:path/logid")
|
return schemas.Response(success=False, message=f"缺少参数:path/logid")
|
||||||
|
|
||||||
if target:
|
if target and target != "None":
|
||||||
target = Path(target)
|
target = Path(target)
|
||||||
|
else:
|
||||||
|
target = None
|
||||||
|
|
||||||
# 类型
|
# 类型
|
||||||
mtype = MediaType(type_name) if type_name else None
|
mtype = MediaType(type_name) if type_name else None
|
||||||
|
@ -119,7 +119,7 @@ class TransferHistoryOper(DbOper):
|
|||||||
"""
|
"""
|
||||||
self.add_force(
|
self.add_force(
|
||||||
src=str(src_path),
|
src=str(src_path),
|
||||||
dest=str(transferinfo.target_path),
|
dest=str(transferinfo.target_path or ''),
|
||||||
mode=mode,
|
mode=mode,
|
||||||
type=mediainfo.type.value,
|
type=mediainfo.type.value,
|
||||||
category=mediainfo.category,
|
category=mediainfo.category,
|
||||||
@ -145,7 +145,7 @@ class TransferHistoryOper(DbOper):
|
|||||||
if mediainfo and transferinfo:
|
if mediainfo and transferinfo:
|
||||||
his = self.add_force(
|
his = self.add_force(
|
||||||
src=str(src_path),
|
src=str(src_path),
|
||||||
dest=str(transferinfo.target_path),
|
dest=str(transferinfo.target_path or ''),
|
||||||
mode=mode,
|
mode=mode,
|
||||||
type=mediainfo.type.value,
|
type=mediainfo.type.value,
|
||||||
category=mediainfo.category,
|
category=mediainfo.category,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user