Merge pull request #1689 from hoey94/main
This commit is contained in:
commit
75c7e71ee6
@ -372,6 +372,24 @@ class Qbittorrent:
|
|||||||
logger.error(f"设置速度限制出错:{str(err)}")
|
logger.error(f"设置速度限制出错:{str(err)}")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def get_speed_limit(self):
|
||||||
|
"""
|
||||||
|
获取QB速度
|
||||||
|
:return: 返回download_limit 和upload_limit ,默认是0
|
||||||
|
"""
|
||||||
|
if not self.qbc:
|
||||||
|
return False
|
||||||
|
|
||||||
|
download_limit = 0
|
||||||
|
upload_limit = 0
|
||||||
|
try:
|
||||||
|
download_limit = self.qbc.transfer.download_limit
|
||||||
|
upload_limit = self.qbc.transfer.upload_limit
|
||||||
|
except Exception as err:
|
||||||
|
logger.error(f"获取速度限制出错:{str(err)}")
|
||||||
|
|
||||||
|
return (download_limit/1024, upload_limit/1024)
|
||||||
|
|
||||||
def recheck_torrents(self, ids: Union[str, list]) -> bool:
|
def recheck_torrents(self, ids: Union[str, list]) -> bool:
|
||||||
"""
|
"""
|
||||||
重新校验种子
|
重新校验种子
|
||||||
|
Loading…
x
Reference in New Issue
Block a user