mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 19:44:52 +00:00
fix missing value
This commit is contained in:
parent
ee9a01ab6d
commit
d39e691c7a
1 changed files with 2 additions and 1 deletions
|
@ -79,13 +79,14 @@ class DesiredSpeed:
|
|||
unique_ID = self.core.get_torrent_unique_id(torrent)
|
||||
try:
|
||||
if self.core.unique_IDs[unique_ID].upload_rate_limit != -1:
|
||||
value = self.core.unique_IDs[unique_ID].upload_rate_limit / 1024
|
||||
value = int(self.core.unique_IDs[unique_ID].upload_rate_limit / 1024)
|
||||
self.core.set_per_upload_rate_limit(unique_ID, value)
|
||||
self.set_up_speeds[unique_ID] = value
|
||||
if value not in self.config.get("up_speeds") and value >= 1:
|
||||
self.config.get("up_speeds").insert(0, value)
|
||||
self.config.get("up_speeds").pop()
|
||||
if self.core.unique_IDs[unique_ID].download_rate_limit != -1:
|
||||
value = int(self.core.unique_IDs[unique_ID].download_rate_limit / 1024)
|
||||
self.core.set_per_download_rate_limit(unique_ID, value)
|
||||
self.set_down_speeds[unique_ID] = value
|
||||
if value not in self.config.get("down_speeds") and value >= 1:
|
||||
|
|
Loading…
Add table
Reference in a new issue