diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py
index 26b09a8f1..52d7fb025 100644
--- a/deluge/core/torrent.py
+++ b/deluge/core/torrent.py
@@ -507,8 +507,13 @@ class Torrent:
if self.handle.is_finished():
# If the torrent has already reached it's 'stop_seed_ratio' then do not do anything
- if self.config["stop_seed_at_ratio"]:
- if self.get_ratio() >= self.config["stop_seed_ratio"]:
+ if self.config["stop_seed_at_ratio"] or self.stop_at_ratio:
+ if self.stop_at_ratio:
+ ratio = self.stop_ratio
+ else:
+ ratio = self.config["stop_seed_ratio"]
+
+ if self.get_ratio() >= ratio:
self.signals.emit("torrent_resume_at_stop_ratio")
return
diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py
index 3174e3d6b..d8a7d563b 100644
--- a/deluge/core/torrentmanager.py
+++ b/deluge/core/torrentmanager.py
@@ -180,13 +180,15 @@ class TorrentManager(component.Component):
self.alerts.handle_alerts(True)
def update(self):
- for torrent in self.torrents:
+ for torrent_id, torrent in self.torrents.items():
if self.config["stop_seed_at_ratio"] or torrent.stop_at_ratio:
- if (torrent.get_ratio() >= self.config["stop_seed_ratio"] or\
- torrent.get_ratio() > torrent.stop_ratio) and torrent.is_finished:
+ stop_ratio = self.config["stop_seed_ratio"]
+ if torrent.stop_at_ratio:
+ stop_ratio = torrent.stop_ratio
+ if torrent.get_ratio() >= stop_ratio and torrent.is_finished:
torrent.pause()
if self.config["remove_seed_at_ratio"] or torrent.remove_at_ratio:
- self.remove(torrent.torrent_id)
+ self.remove(torrent_id)
def __getitem__(self, torrent_id):
"""Return the Torrent with torrent_id"""
diff --git a/deluge/ui/gtkui/glade/main_window.glade b/deluge/ui/gtkui/glade/main_window.glade
index e00555ebb..3f3884370 100644
--- a/deluge/ui/gtkui/glade/main_window.glade
+++ b/deluge/ui/gtkui/glade/main_window.glade
@@ -666,286 +666,137 @@
-
- True
-
-
- 5
- 6
- 3
- 4
- GTK_FILL
-
-
-
-
- True
- 0
- <b>Auto Managed:</b>
- True
-
-
- 4
- 5
- 3
- 4
- GTK_FILL
-
-
-
-
- True
-
-
- 7
- 8
- 2
- 3
- GTK_FILL
-
-
-
-
- True
-
-
- 7
- 8
- 1
- 2
- GTK_FILL
-
-
-
-
- True
- 0
- <b>Seed Rank:</b>
- True
-
-
- 6
- 7
- 2
- 3
- GTK_FILL
-
-
-
-
- True
- 0
- <b>Seeding Time:</b>
- True
-
-
- 6
- 7
- 1
- 2
- GTK_FILL
-
-
-
-
- True
-
-
- 7
- 8
- GTK_FILL
-
-
-
-
- True
- 0
- <b>Active Time:</b>
- True
-
-
- 6
- 7
- GTK_FILL
-
-
-
-
- True
- 0
- True
- True
-
-
- 1
- 2
- 3
- 4
- GTK_FILL
-
-
-
-
- True
- 0
-
-
- 3
- 4
- 3
- 4
- GTK_FILL
-
-
-
-
- True
- 0
- PANGO_WRAP_CHAR
- True
-
-
- 1
- 6
- 4
- 5
- GTK_FILL
-
-
-
-
- True
- 0
- <b>Tracker Status:</b>
- True
-
-
- 4
- 5
- GTK_FILL
-
-
-
-
-
- True
- 0
- True
- PANGO_WRAP_WORD_CHAR
-
-
- 5
- 6
- 2
- 3
- GTK_FILL
-
-
-
-
-
- True
- 0
- 1
- <b>Availability:</b>
- True
-
-
- 4
- 5
- 2
- 3
- GTK_FILL
-
-
-
-
- True
- 0
-
-
- 3
- 4
- 2
- 3
- GTK_FILL
-
-
-
-
+
True
0
1
2
+ GTK_FILL
+
+
+
+
+ True
+ 0
+
+
+ 3
+ 4
+ GTK_FILL
+
+
+
+
+ True
+ 0
+
+
+ 1
+ 2
+ 1
+ 2
+ GTK_FILL
+
+
+
+
+ True
+ 0
+
+
+ 3
+ 4
+ 1
+ 2
+ GTK_FILL
+
+
+
+
+ True
+ 5
+
+
+ True
+ 0
+ <b>Downloaded:</b>
+ True
+
+
+
+
+ GTK_FILL
+
+
+
+
+ True
+ 5
+
+
+ True
+ 0
+ <b>Uploaded:</b>
+ True
+
+
+
+
+ 1
+ 2
+ GTK_FILL
+
+
+
+
+ True
+ 5
+
+
+ True
+ 0
+ <b>Share Ratio:</b>
+ True
+
+
+
+
2
3
GTK_FILL
-
+
True
- 0
+ 5
+
+
+ True
+ 0
+ <b>Next Announce:</b>
+ True
+
+
- 5
- 6
- 1
- 2
+ 3
+ 4
GTK_FILL
-
- True
- 0
- <b>Peers:</b>
- True
-
-
- 4
- 5
- 1
- 2
- GTK_FILL
-
-
-
-
- True
- 0
-
-
- 5
- 6
- GTK_FILL
-
-
-
-
- True
- 0
- <b>Seeders:</b>
- True
-
-
- 4
- 5
- GTK_FILL
-
-
-
-
+
True
15
5
-
+
True
0
- <b>Pieces:</b>
+ <b>Speed:</b>
True
@@ -953,30 +804,6 @@
2
3
- 3
- 4
- GTK_FILL
-
-
-
-
- True
- 15
- 5
-
-
- True
- 0
- <b>ETA:</b>
- True
-
-
-
-
- 2
- 3
- 2
- 3
GTK_FILL
@@ -1003,15 +830,15 @@
-
+
True
15
5
-
+
True
0
- <b>Speed:</b>
+ <b>ETA:</b>
True
@@ -1019,128 +846,301 @@
2
3
- GTK_FILL
-
-
-
-
- True
- 5
-
-
- True
- 0
- <b>Next Announce:</b>
- True
-
-
-
-
- 3
- 4
- GTK_FILL
-
-
-
-
- True
- 5
-
-
- True
- 0
- <b>Share Ratio:</b>
- True
-
-
-
-
2
3
GTK_FILL
-
+
True
+ 15
5
-
+
True
0
- <b>Uploaded:</b>
+ <b>Pieces:</b>
True
- 1
- 2
+ 2
+ 3
+ 3
+ 4
GTK_FILL
-
+
True
- 5
-
-
- True
- 0
- <b>Downloaded:</b>
- True
-
-
+ 0
+ <b>Seeders:</b>
+ True
+ 4
+ 5
GTK_FILL
-
+
True
0
- 3
- 4
+ 5
+ 6
+ GTK_FILL
+
+
+
+
+ True
+ 0
+ <b>Peers:</b>
+ True
+
+
+ 4
+ 5
1
2
GTK_FILL
-
+
+ True
+ 0
+
+
+ 5
+ 6
+ 1
+ 2
+ GTK_FILL
+
+
+
+
True
0
1
2
- 1
- 2
+ 2
+ 3
GTK_FILL
-
+
True
0
3
4
+ 2
+ 3
GTK_FILL
-
+
+ True
+ 0
+ 1
+ <b>Availability:</b>
+ True
+
+
+ 4
+ 5
+ 2
+ 3
+ GTK_FILL
+
+
+
+
+ True
+ 0
+ True
+ PANGO_WRAP_WORD_CHAR
+
+
+ 5
+ 6
+ 2
+ 3
+ GTK_FILL
+
+
+
+
+
+ True
+ 0
+ <b>Tracker Status:</b>
+ True
+
+
+ 4
+ 5
+ GTK_FILL
+
+
+
+
+
+ True
+ 0
+ PANGO_WRAP_CHAR
+ True
+
+
+ 1
+ 6
+ 4
+ 5
+ GTK_FILL
+
+
+
+
True
0
+
+ 3
+ 4
+ 3
+ 4
+ GTK_FILL
+
+
+
+
+ True
+ 0
+ True
+ True
+
1
2
+ 3
+ 4
+ GTK_FILL
+
+
+
+
+ True
+ 0
+ <b>Active Time:</b>
+ True
+
+
+ 6
+ 7
+ GTK_FILL
+
+
+
+
+ True
+
+
+ 7
+ 8
+ GTK_FILL
+
+
+
+
+ True
+ 0
+ <b>Seeding Time:</b>
+ True
+
+
+ 6
+ 7
+ 1
+ 2
+ GTK_FILL
+
+
+
+
+ True
+ 0
+ <b>Seed Rank:</b>
+ True
+
+
+ 6
+ 7
+ 2
+ 3
+ GTK_FILL
+
+
+
+
+ True
+
+
+ 7
+ 8
+ 1
+ 2
+ GTK_FILL
+
+
+
+
+ True
+
+
+ 7
+ 8
+ 2
+ 3
+ GTK_FILL
+
+
+
+
+ True
+ 0
+ <b>Auto Managed:</b>
+ True
+
+
+ 4
+ 5
+ 3
+ 4
+ GTK_FILL
+
+
+
+
+ True
+
+
+ 5
+ 6
+ 3
+ 4
GTK_FILL
@@ -1227,7 +1227,7 @@
-
+
True
0
True
@@ -1235,112 +1235,44 @@
1
2
- 4
- 5
-
-
-
-
-
- True
- 0
- 1
- <b># of files:</b>
- True
-
-
- 4
- 5
- GTK_FILL
-
-
-
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- 0
- True
- PANGO_WRAP_CHAR
- True
-
-
- 1
- 4
- 1
- 2
-
-
-
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- 0
- <b>Hash:</b>
- True
-
-
- 1
- 2
- GTK_FILL
-
-
-
-
-
- True
- 0
- True
-
-
- 1
- 4
- 6
- 7
-
-
-
-
-
- True
- 0
- 1
- <b>Tracker:</b>
- True
-
-
- 6
- 7
- GTK_FILL
-
-
-
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- 5
-
-
- True
- 0
- 1
- <b>Total Size:</b>
- True
-
-
-
-
3
4
+
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 0
+
+
+ 1
+ 4
+ 5
+ 6
+
+
+
+
+
+ True
+ 0
+ 1
+ <b>Status:</b>
+ True
+
+
+ 5
+ 6
GTK_FILL
-
+
True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
0
True
PANGO_WRAP_CHAR
@@ -1349,27 +1281,8 @@
1
4
-
-
-
-
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- 5
-
-
- True
- 0
- 0
- 1
- <b>Name:</b>
- True
-
-
-
-
- GTK_FILL
+ 2
+ 3
@@ -1396,7 +1309,108 @@
-
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 5
+
+
+ True
+ 0
+ 0
+ 1
+ <b>Name:</b>
+ True
+
+
+
+
+ GTK_FILL
+
+
+
+
+
+ True
+ 0
+ True
+ PANGO_WRAP_CHAR
+ True
+
+
+ 1
+ 4
+
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 5
+
+
+ True
+ 0
+ 1
+ <b>Total Size:</b>
+ True
+
+
+
+
+ 3
+ 4
+ GTK_FILL
+
+
+
+
+
+ True
+ 0
+ 1
+ <b>Tracker:</b>
+ True
+
+
+ 6
+ 7
+ GTK_FILL
+
+
+
+
+
+ True
+ 0
+ True
+
+
+ 1
+ 4
+ 6
+ 7
+
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 0
+ <b>Hash:</b>
+ True
+
+
+ 1
+ 2
+ GTK_FILL
+
+
+
+
+
True
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
0
@@ -1407,42 +1421,28 @@
1
4
- 2
- 3
+ 1
+ 2
-
+
True
0
1
- <b>Status:</b>
+ <b># of files:</b>
True
- 5
- 6
+ 4
+ 5
GTK_FILL
-
- True
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- 0
-
-
- 1
- 4
- 5
- 6
-
-
-
-
-
+
True
0
True
@@ -1450,8 +1450,8 @@
1
2
- 3
- 4
+ 4
+ 5
@@ -1634,7 +1634,7 @@
-
+
True
True
6
@@ -1644,8 +1644,100 @@
1
2
+ 3
+ 4
+
+
+
+
+
+
+ True
+ 0
+ Max Upload Slots:
+
+
+ 3
+ 4
+ GTK_FILL
+
+
+
+
+
+ True
+ KiB/s
+
+
+ 2
+ 3
+ 1
+ 2
+
+
+
+
+
+
+ True
+ KiB/s
+
+
+ 2
+ 3
+
+
+
+
+
+
+ True
+ 0
+ Max Download Speed:
+
+
+ GTK_FILL
+
+
+
+
+
+ True
+ 0
+ Max Upload Speed:
+
+
+ 1
+ 2
+ GTK_FILL
+
+
+
+
+
+ True
+ 0
+ Max Connections:
+
+
2
3
+ GTK_FILL
+
+
+
+
+
+ True
+ True
+ 6
+ 1
+ -1 -1 999999 1 10 10
+ 1
+
+
+ 1
+ 2
@@ -1669,110 +1761,18 @@
-
+
True
True
6
1
-1 -1 999999 1 10 10
- 1
1
2
-
-
-
-
-
-
- True
- 0
- Max Connections:
-
-
2
3
- GTK_FILL
-
-
-
-
-
- True
- 0
- Max Upload Speed:
-
-
- 1
- 2
- GTK_FILL
-
-
-
-
-
- True
- 0
- Max Download Speed:
-
-
- GTK_FILL
-
-
-
-
-
- True
- KiB/s
-
-
- 2
- 3
-
-
-
-
-
-
- True
- KiB/s
-
-
- 2
- 3
- 1
- 2
-
-
-
-
-
-
- True
- 0
- Max Upload Slots:
-
-
- 3
- 4
- GTK_FILL
-
-
-
-
-
- True
- True
- 6
- 1
- -1 -1 999999 1 10 10
-
-
- 1
- 2
- 3
- 4
@@ -1849,7 +1849,8 @@
True
1
2 0 999 0.10000000000000001 10 10
- 2
+ 1
+ True
False
@@ -2354,14 +2355,23 @@
10
2
-
+
+ True
+ 0
+ <i>Current Version:</i>
+ True
+
+
+ GTK_FILL
+
+
+
+
True
1
2
- 1
- 2
@@ -2379,26 +2389,17 @@
-
+
True
1
2
+ 1
+ 2
-
-
- True
- 0
- <i>Current Version:</i>
- True
-
-
- GTK_FILL
-
-