Author: andar

Revision: 6066

Log:
        Don't apply 'stop/remove on completed' rules to torrents in a Queued or 
Paused state

Diff:
Modified: branches/1.2_RC/deluge/core/torrentmanager.py
===================================================================
--- branches/1.2_RC/deluge/core/torrentmanager.py       2009-12-26 17:10:14 UTC 
(rev 6065)
+++ branches/1.2_RC/deluge/core/torrentmanager.py       2009-12-28 21:50:13 UTC 
(rev 6066)
@@ -253,7 +253,7 @@
 
     def update(self):
         for torrent_id, torrent in self.torrents.items():
-            if self.config["stop_seed_at_ratio"] or 
torrent.options["stop_at_ratio"] and torrent.state not in ("Checking", 
"Allocating"):
+            if self.config["stop_seed_at_ratio"] or 
torrent.options["stop_at_ratio"] and torrent.state not in ("Checking", 
"Allocating", "Paused", "Queued"):
                 # If the global setting is set, but the per-torrent isn't.. 
Just skip to the next torrent
                 # This is so that a user can turn-off the stop at ratio option 
on a per-torrent basis
                 if self.config["stop_seed_at_ratio"] and not 
torrent.options["stop_at_ratio"]:

Modified: trunk/deluge/core/torrentmanager.py
===================================================================
--- trunk/deluge/core/torrentmanager.py 2009-12-26 17:10:14 UTC (rev 6065)
+++ trunk/deluge/core/torrentmanager.py 2009-12-28 21:50:13 UTC (rev 6066)
@@ -253,7 +253,7 @@
 
     def update(self):
         for torrent_id, torrent in self.torrents.items():
-            if self.config["stop_seed_at_ratio"] or 
torrent.options["stop_at_ratio"] and torrent.state not in ("Checking", 
"Allocating"):
+            if self.config["stop_seed_at_ratio"] or 
torrent.options["stop_at_ratio"] and torrent.state not in ("Checking", 
"Allocating", "Paused", "Queued"):
                 # If the global setting is set, but the per-torrent isn't.. 
Just skip to the next torrent
                 # This is so that a user can turn-off the stop at ratio option 
on a per-torrent basis
                 if self.config["stop_seed_at_ratio"] and not 
torrent.options["stop_at_ratio"]:


--

You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.


Reply via email to