mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Duplicate code found in rTorrent client module removed
This commit is contained in:
parent
69691f9d41
commit
06913ea517
@ -75,34 +75,6 @@ class rTorrentAPI(GenericClient):
|
|||||||
except:
|
except:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if not self.auth:
|
|
||||||
return False
|
|
||||||
|
|
||||||
if not result:
|
|
||||||
return False
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Send magnet to rTorrent
|
|
||||||
torrent = self.auth.load_magnet(result.url, result.hash)
|
|
||||||
|
|
||||||
if not torrent:
|
|
||||||
return False
|
|
||||||
|
|
||||||
# Set label
|
|
||||||
if sickbeard.TORRENT_LABEL:
|
|
||||||
torrent.set_custom(1, sickbeard.TORRENT_LABEL.lower())
|
|
||||||
|
|
||||||
if sickbeard.TORRENT_PATH:
|
|
||||||
torrent.set_directory(sickbeard.TORRENT_PATH)
|
|
||||||
|
|
||||||
# Start torrent
|
|
||||||
torrent.start()
|
|
||||||
|
|
||||||
return True
|
|
||||||
|
|
||||||
except:
|
|
||||||
return False
|
|
||||||
|
|
||||||
def _add_torrent_file(self, result):
|
def _add_torrent_file(self, result):
|
||||||
filedata = None
|
filedata = None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user