From 984e5e101dcef290fd2331f007141cb6834cb495 Mon Sep 17 00:00:00 2001 From: echel0n Date: Tue, 22 Apr 2014 14:58:48 -0700 Subject: [PATCH] Fixes for BTN provider --- sickbeard/providers/btn.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sickbeard/providers/btn.py b/sickbeard/providers/btn.py index 9e8b3c1f..2ddb8599 100644 --- a/sickbeard/providers/btn.py +++ b/sickbeard/providers/btn.py @@ -202,7 +202,6 @@ class BTNProvider(generic.TorrentProvider): current_params = {} - if show.indexer == 1: current_params['tvdb'] = show.indexerid elif show.indexer == 2: @@ -242,7 +241,13 @@ class BTNProvider(generic.TorrentProvider): return [{}] search_params = {'category': 'Episode'} - search_params['series'] = sanitizeSceneName(ep_obj.show.name) + + if ep_obj.show.indexer == 1: + search_params['tvdb'] = ep_obj.show.indexerid + elif ep_obj.show.indexer == 2: + search_params['tvrage'] = ep_obj.show.indexerid + else: + search_params['series'] = sanitizeSceneName(ep_obj.show.name) if ep_obj.show.air_by_date: date_str = str(ep_obj.airdate) @@ -341,7 +346,6 @@ class BTNCache(tvcache.TVCache): else: raise AuthException( "Your authentication info for " + self.provider.name + " is incorrect, check your config") - else: return []