fix bug
This commit is contained in:
@ -155,7 +155,8 @@ class QbittorrentModule(_ModuleBase):
|
||||
return None
|
||||
return ret_torrents
|
||||
|
||||
def transfer_completed(self, hashs: Union[str, list], transinfo: TransferInfo) -> None:
|
||||
def transfer_completed(self, hashs: Union[str, list],
|
||||
transinfo: TransferInfo = None) -> None:
|
||||
"""
|
||||
转移完成后的处理
|
||||
:param hashs: 种子Hash
|
||||
@ -167,7 +168,7 @@ class QbittorrentModule(_ModuleBase):
|
||||
if self.remove_torrents(hashs):
|
||||
logger.info(f"移动模式删除种子成功:{hashs} ")
|
||||
# 删除残留文件
|
||||
if transinfo.path and transinfo.path.exists():
|
||||
if transinfo and transinfo.path and transinfo.path.exists():
|
||||
files = SystemUtils.list_files(transinfo.path, settings.RMT_MEDIAEXT)
|
||||
if not files:
|
||||
logger.warn(f"删除残留文件夹:{transinfo.path}")
|
||||
|
Reference in New Issue
Block a user