fix speedlimiter
This commit is contained in:
@ -106,6 +106,8 @@ class Qbittorrent(metaclass=Singleton):
|
||||
:param ids: 种子Hash列表
|
||||
:param tag: 标签内容
|
||||
"""
|
||||
if not self.qbc:
|
||||
return False
|
||||
try:
|
||||
self.qbc.torrents_delete_tags(torrent_hashes=ids, tags=tag)
|
||||
return True
|
||||
@ -129,6 +131,8 @@ class Qbittorrent(metaclass=Singleton):
|
||||
"""
|
||||
设置强制作种
|
||||
"""
|
||||
if not self.qbc:
|
||||
return
|
||||
try:
|
||||
self.qbc.torrents_set_force_start(enable=True, torrent_hashes=ids)
|
||||
except Exception as err:
|
||||
@ -266,6 +270,8 @@ class Qbittorrent(metaclass=Singleton):
|
||||
"""
|
||||
获取种子文件清单
|
||||
"""
|
||||
if not self.qbc:
|
||||
return None
|
||||
try:
|
||||
return self.qbc.torrents_files(torrent_hash=tid)
|
||||
except Exception as err:
|
||||
@ -276,6 +282,8 @@ class Qbittorrent(metaclass=Singleton):
|
||||
"""
|
||||
设置下载文件的状态,priority为0为不下载,priority为1为下载
|
||||
"""
|
||||
if not self.qbc:
|
||||
return False
|
||||
if not kwargs.get("torrent_hash") or not kwargs.get("file_ids"):
|
||||
return False
|
||||
try:
|
||||
@ -291,6 +299,8 @@ class Qbittorrent(metaclass=Singleton):
|
||||
"""
|
||||
获取传输信息
|
||||
"""
|
||||
if not self.qbc:
|
||||
return None
|
||||
try:
|
||||
return self.qbc.transfer_info()
|
||||
except Exception as err:
|
||||
|
Reference in New Issue
Block a user