tweak pause/resume
This commit is contained in:
parent
eeb2c26002
commit
ea7fdc3bc1
|
@ -758,12 +758,16 @@ Space:") + " " + nice_free)
|
|||
deluge_core.scrape_tracker(unique_ID)
|
||||
|
||||
def pause(self, unique_ID):
|
||||
state = self.get_torrent_state(unique_ID)
|
||||
if not state["is_paused"]:
|
||||
try:
|
||||
deluge_core.pause(unique_ID)
|
||||
except:
|
||||
print "pause failed\n"
|
||||
|
||||
def resume(self, unique_ID):
|
||||
state = self.get_torrent_state(unique_ID)
|
||||
if state["is_paused"]:
|
||||
try:
|
||||
deluge_core.resume(unique_ID)
|
||||
# We have to re-apply per torrent settings after resume. This has to
|
||||
|
@ -884,7 +888,6 @@ Space:") + " " + nice_free)
|
|||
except DelugeError, e:
|
||||
del self.state.torrents[torrent]
|
||||
raise e
|
||||
|
||||
ret = unique_ID
|
||||
self.unique_IDs[unique_ID] = torrent
|
||||
self.state.torrents[torrent] = unique_ID
|
||||
|
|
Loading…
Reference in New Issue