Skip to content

Commit

Permalink
Added Torrent.set_directory_base
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzeman committed Sep 29, 2013
1 parent 81d6563 commit 4517112
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rtorrent/torrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,17 @@ def set_directory(self, d):

self.directory = m.call()[-1]

def set_directory_base(self, d):
"""Modify base download directory
@note: Needs to stop torrent in order to change the directory.
Also doesn't restart after directory is set, that must be called
separately.
"""
m = rtorrent.rpc.Multicall(self)
self.multicall_add(m, "d.try_stop")
self.multicall_add(m, "d.set_directory_base", d)

def start(self):
"""Start the torrent"""
m = rtorrent.rpc.Multicall(self)
Expand Down

0 comments on commit 4517112

Please sign in to comment.