This commit is contained in:
jxxghp 2023-08-28 19:04:37 +08:00
parent 6a34c7196c
commit 8bc883b621
2 changed files with 4 additions and 2 deletions

View File

@ -72,6 +72,8 @@ def manual_transfer(path: str,
)
# 失败
if not state:
if isinstance(errormsg, list):
errormsg = f"整理完成,{len(errormsg)} 个文件转移失败!"
return schemas.Response(success=False, message=errormsg)
# 成功
return schemas.Response(success=True)

View File

@ -320,7 +320,7 @@ class TransferChain(ChainBase):
season: int = None,
transfer_type: str = None,
epformat: EpisodeFormat = None,
min_filesize: int = 0) -> Tuple[bool, str]:
min_filesize: int = 0) -> Tuple[bool, Union[str, list]]:
"""
手动转移
:param in_path: 源文件路径
@ -496,7 +496,7 @@ class TransferChain(ChainBase):
logger.info(f"转移完成,共 {total_num} 个文件,成功 {total_num - len(errmsgs)} 个,失败 {len(errmsgs)}")
self.progress.end(ProgressKey.FileTransfer)
if errmsgs:
return False, "\n".join(errmsgs)
return False, errmsgs
return True, ""
def __insert_sucess_history(self, src_path: Path, meta: MetaBase,