This commit is contained in:
jxxghp
2023-06-13 08:25:57 +08:00
parent 99440d18d2
commit 3d410e6d0b
8 changed files with 123 additions and 18 deletions

View File

@ -122,5 +122,13 @@ class TransmissionModule(_ModuleBase):
self.transmission.set_torrent_tag(ids=hashs, tags=['已整理'])
# 移动模式删除种子
if settings.TRANSFER_TYPE == "move":
if self.transmission.delete_torrents(delete_file=True, ids=hashs):
if self.remove_torrents(hashs):
logger.info(f"移动模式删除种子成功:{hashs} ")
def remove_torrents(self, hashs: Union[str, list]) -> bool:
"""
删除下载器种子
:param hashs: 种子Hash
:return: bool
"""
return self.transmission.delete_torrents(delete_file=True, ids=hashs)