fix download contral
This commit is contained in:
parent
8adab8d645
commit
fe7e84d5da
@ -259,7 +259,7 @@ class ChainBase(AbstractSingleton, metaclass=Singleton):
|
||||
:param hashs: 种子Hash
|
||||
:return: bool
|
||||
"""
|
||||
return self.run_module("start_torrent", hash_str=hashs)
|
||||
return self.run_module("start_torrents", hashs=hashs)
|
||||
|
||||
def stop_torrents(self, hashs: Union[list, str]) -> bool:
|
||||
"""
|
||||
@ -267,7 +267,7 @@ class ChainBase(AbstractSingleton, metaclass=Singleton):
|
||||
:param hashs: 种子Hash
|
||||
:return: bool
|
||||
"""
|
||||
return self.run_module("stop_torrent", hashs=hashs)
|
||||
return self.run_module("stop_torrents", hashs=hashs)
|
||||
|
||||
def media_exists(self, mediainfo: MediaInfo) -> Optional[ExistMediaInfo]:
|
||||
"""
|
||||
|
@ -555,11 +555,11 @@ class DownloadChain(ChainBase):
|
||||
|
||||
def set_downloading(self, hash_str, oper: str) -> bool:
|
||||
"""
|
||||
控制下载任务 start/pause
|
||||
控制下载任务 start/stop
|
||||
"""
|
||||
if oper == "start":
|
||||
return self.start_torrents(hashs=[hash_str])
|
||||
elif oper == "pause":
|
||||
elif oper == "stop":
|
||||
return self.stop_torrents(hashs=[hash_str])
|
||||
return False
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user