mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-11-11 00:41:34 +08:00
Fixes bug #158
This commit is contained in:
parent
ac3267688b
commit
0db66e68fd
1 changed files with 2 additions and 9 deletions
|
|
@ -330,9 +330,9 @@ class Qbt:
|
||||||
logger.insert_space(f"Limit UL Speed: {limit_upload_speed} kB/s", 1), self.config.loglevel
|
logger.insert_space(f"Limit UL Speed: {limit_upload_speed} kB/s", 1), self.config.loglevel
|
||||||
)
|
)
|
||||||
if max_ratio or max_seeding_time:
|
if max_ratio or max_seeding_time:
|
||||||
if (max_ratio == -2 or max_seeding_time == -2) and not restore:
|
if (max_ratio == -2 and max_seeding_time == -2) and not restore:
|
||||||
body += logger.print_line(logger.insert_space("Share Limit: Use Global Share Limit", 4), self.config.loglevel)
|
body += logger.print_line(logger.insert_space("Share Limit: Use Global Share Limit", 4), self.config.loglevel)
|
||||||
elif (max_ratio == -1 or max_seeding_time == -1) and not restore:
|
elif (max_ratio == -1 and max_seeding_time == -1) and not restore:
|
||||||
body += logger.print_line(logger.insert_space("Share Limit: Set No Share Limit", 4), self.config.loglevel)
|
body += logger.print_line(logger.insert_space("Share Limit: Set No Share Limit", 4), self.config.loglevel)
|
||||||
else:
|
else:
|
||||||
if max_ratio != torrent.max_ratio and (not max_seeding_time or max_seeding_time < 0):
|
if max_ratio != torrent.max_ratio and (not max_seeding_time or max_seeding_time < 0):
|
||||||
|
|
@ -357,13 +357,6 @@ class Qbt:
|
||||||
torrent.set_upload_limit(-1)
|
torrent.set_upload_limit(-1)
|
||||||
else:
|
else:
|
||||||
torrent.set_upload_limit(limit_upload_speed * 1024)
|
torrent.set_upload_limit(limit_upload_speed * 1024)
|
||||||
if (max_ratio or max_seeding_time) and not restore:
|
|
||||||
if max_ratio == -2 or max_seeding_time == -2:
|
|
||||||
torrent.set_share_limits(-2, -2)
|
|
||||||
return body
|
|
||||||
elif max_ratio == -1 or max_seeding_time == -1:
|
|
||||||
torrent.set_share_limits(-1, -1)
|
|
||||||
return body
|
|
||||||
if not max_ratio:
|
if not max_ratio:
|
||||||
max_ratio = torrent.max_ratio
|
max_ratio = torrent.max_ratio
|
||||||
if not max_seeding_time:
|
if not max_seeding_time:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue