Merge branch 'develop' of github.com:RuudBurger/CouchPotatoServer into develop

This commit is contained in:
Ruud
2014-01-23 22:00:40 +01:00
2 changed files with 3 additions and 4 deletions
@@ -134,7 +134,7 @@ class rTorrent(Downloader):
# Send request to rTorrent # Send request to rTorrent
try: try:
# Send torrent to rTorrent # Send torrent to rTorrent
torrent = self.rt.load_torrent(filedata) torrent = self.rt.load_torrent(filedata, verify_retries=10)
if not torrent: if not torrent:
log.error('Unable to find the torrent, did it fail to load?') log.error('Unable to find the torrent, did it fail to load?')
+2 -3
View File
@@ -199,7 +199,7 @@ class RTorrent:
return(func_name) return(func_name)
def load_torrent(self, torrent, start=False, verbose=False, verify_load=True): def load_torrent(self, torrent, start=False, verbose=False, verify_load=True, verify_retries=3):
""" """
Loads torrent into rTorrent (with various enhancements) Loads torrent into rTorrent (with various enhancements)
@@ -244,9 +244,8 @@ class RTorrent:
getattr(p, func_name)(torrent) getattr(p, func_name)(torrent)
if verify_load: if verify_load:
MAX_RETRIES = 3
i = 0 i = 0
while i < MAX_RETRIES: while i < verify_retries:
self.get_torrents() self.get_torrents()
if info_hash in [t.info_hash for t in self.torrents]: if info_hash in [t.info_hash for t in self.torrents]:
break break