From ba47d7eea762c10e085f78bb79f038eca5d33a8a Mon Sep 17 00:00:00 2001 From: Ruud Date: Tue, 7 Oct 2014 11:46:42 +0200 Subject: [PATCH] Use torrent-duplicate if returned from Transmission fix #4014 --- couchpotato/core/downloaders/transmission.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/downloaders/transmission.py b/couchpotato/core/downloaders/transmission.py index d6112a91..0361330c 100644 --- a/couchpotato/core/downloaders/transmission.py +++ b/couchpotato/core/downloaders/transmission.py @@ -78,12 +78,14 @@ class Transmission(DownloaderBase): log.error('Failed sending torrent to Transmission') return False + data = remote_torrent.get('torrent-added') or remote_torrent.get('torrent-duplicate') + # Change settings of added torrents if torrent_params: - self.trpc.set_torrent(remote_torrent['torrent-added']['hashString'], torrent_params) + self.trpc.set_torrent(data['hashString'], torrent_params) log.info('Torrent sent to Transmission successfully.') - return self.downloadReturnId(remote_torrent['torrent-added']['hashString']) + return self.downloadReturnId(data['hashString']) def test(self): if self.connect() and self.trpc.get_session():