From f3073174eda66863daf7d467ef4621a3728ffb81 Mon Sep 17 00:00:00 2001 From: echel0n Date: Sun, 17 Aug 2014 22:02:29 -0700 Subject: [PATCH] Possible fix for failed to send torrent errors --- sickbeard/search.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sickbeard/search.py b/sickbeard/search.py index 942e7f58..08af2dd2 100644 --- a/sickbeard/search.py +++ b/sickbeard/search.py @@ -130,7 +130,12 @@ def snatchEpisode(result, endStatus=SNATCHED): dlResult = _downloadResult(result) else: # Snatches torrent with client - result.content = result.provider.getURL(result.url) if not result.url.startswith('magnet') else None + result.content = None + if not result.url.startswith('magnet'): + result.content = result.provider.getURL(result.url) + if not result.content: + return False + client = clients.getClientIstance(sickbeard.TORRENT_METHOD)() dlResult = client.sendTORRENT(result) else: