Private GIT

Skip to content
Snippets Groups Projects
Commit 26865623 authored by jalim's avatar jalim Committed by Dustyn Gibson
Browse files

Modified deluged_client.py to allow move to folder to be set.

parent c08ffaae
No related branches found
No related tags found
No related merge requests found
......@@ -94,7 +94,11 @@ class DelugeDAPI(GenericClient):
def _set_torrent_path(self, result):
path = sickbeard.TORRENT_PATH
if path:
if self.drpc.set_torrent_path(result.hash, path):
return True
return False
def _set_torrent_pause(self, result):
......@@ -179,6 +183,19 @@ class DelugeRPC(object):
self.disconnect()
return True
def set_torrent_path(self, torrent_id, path):
try:
self.connect()
self.client.core.set_torrent_move_completed_path(torrent_id, path).get()
self.client.core.set_torrent_move_completed(torrent_id, 1).get()
except Exception as err:
logger.log('DelugeD: Failed to set path for torrent: ' + err + ' ' + traceback.format_exc(), logger.ERROR)
return False
finally:
if self.client:
self.disconnect()
return True
def pause_torrent(self, torrent_ids):
try:
self.connect()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment