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

Commit

Permalink
Merge 14d83e3 into 669ecf1
Browse files Browse the repository at this point in the history
  • Loading branch information
itzaname committed Aug 29, 2018
2 parents 669ecf1 + 14d83e3 commit 8ee60b9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions autotorrent/clients/rtorrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,11 @@ 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))
cmd = [torrent_file, 'd.set_directory_base="%s"' % os.path.abspath(destination_path), 'd.set_custom1=%s'
% quote(self.label)]
if 'd.directory_base.set' in self.get_methods():
cmd = [torrent_file, 'd.directory_base.set="%s"' % os.path.abspath(destination_path), 'd.custom1.set=%s'
% quote(self.label)]

logger.info('Sending to rtorrent: %r' % cmd)
if 'load.start' in self.get_methods():
Expand Down

0 comments on commit 8ee60b9

Please sign in to comment.