Skip to content
This repository has been archived by the owner on May 29, 2022. It is now read-only.

Commit

Permalink
fixed issues with rtorrent 0.9.7 commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders Jensen committed Aug 29, 2018
1 parent 669ecf1 commit 55a3969
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions autotorrent/clients/rtorrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,15 @@ def add_torrent(self, torrent, destination_path, files, fast_resume=True):

infohash = hashlib.sha1(bencode(torrent[b'info'])).hexdigest()

cmd = [torrent_file, 'd.set_directory_base="%s"' % os.path.abspath(destination_path)]
cmd.append('d.set_custom1=%s' % quote(self.label))

logger.info('Sending to rtorrent: %r' % cmd)
if 'load.start' in self.get_methods():
cmd = [torrent_file, 'd.directory_base.set="%s"' % os.path.abspath(destination_path)]
cmd.append('d.custom1.set=%s' % quote(self.label))
logger.info('Sending to rtorrent: %r' % cmd)
self.proxy.load.start('', *cmd)
else:
cmd = [torrent_file, 'd.set_directory_base="%s"' % os.path.abspath(destination_path)]
cmd.append('d.set_custom1=%s' % quote(self.label))
logger.info('Sending to rtorrent: %r' % cmd)
self.proxy.load_start(*cmd)

successful = False
Expand Down

0 comments on commit 55a3969

Please sign in to comment.