diff --git a/gui/slick/interfaces/default/config_providers.tmpl b/gui/slick/interfaces/default/config_providers.tmpl index 2c0a21db..453f0213 100644 --- a/gui/slick/interfaces/default/config_providers.tmpl +++ b/gui/slick/interfaces/default/config_providers.tmpl @@ -116,13 +116,12 @@ var show_nzb_providers = #if $sickbeard.USE_NZBS then "true" else "false"#; #set $provider_config_list = [] #for $curProvider in $sickbeard.providers.sortedProviderList(): - #set $cur_provider_obj = $sickbeard.providers.getProviderClass($curProvider.getID()) - #if $cur_provider_obj.providerType == $GenericProvider.NZB and not $sickbeard.USE_NZBS: + #if $curProvider.providerType == $GenericProvider.NZB and not $sickbeard.USE_NZBS: #continue - #elif $cur_provider_obj.providerType == $GenericProvider.TORRENT and not $sickbeard.USE_TORRENTS: + #elif $curProvider.providerType == $GenericProvider.TORRENT and not $sickbeard.USE_TORRENTS: #continue #end if - $provider_config_list.append($cur_provider_obj) + $provider_config_list.append($curProvider) #end for #if $provider_config_list: diff --git a/sickbeard/providers/torrentbytes.py b/sickbeard/providers/torrentbytes.py index 24f3dfd9..ace53750 100644 --- a/sickbeard/providers/torrentbytes.py +++ b/sickbeard/providers/torrentbytes.py @@ -11,7 +11,7 @@ # SickRage is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with SickRage. If not, see . @@ -94,8 +94,7 @@ class TorrentBytesProvider(generic.TorrentProvider): return False if re.search('Username or password incorrect', response.text): - - logger.log(u'Invalid username or password for ' + self.name + ' Check your settings', logger.ERROR) + logger.log(u'Invalid username or password for ' + self.name + ' Check your settings', logger.ERROR) return False return True @@ -185,11 +184,11 @@ class TorrentBytesProvider(generic.TorrentProvider): for result in torrent_rows[1:]: cells = result.find_all('td') - link = cells[1].find('a', attrs = {'class': 'index'}) + link = cells[1].find('a', attrs={'class': 'index'}) full_id = link['href'].replace('details.php?id=', '') torrent_id = full_id[:6] - + try: if link.has_key('title'): title = cells[1].find('a', {'class': 'index'})['title'] @@ -325,8 +324,6 @@ class TorrentBytesCache(tvcache.TVCache): if ci is not None: cl.append(ci) - - if cl: myDB = self._getDB() myDB.mass_action(cl) @@ -339,7 +336,7 @@ class TorrentBytesCache(tvcache.TVCache): if not title or not url: return None - logger.log(u"Attempting to cache item:[" + title +"]", logger.DEBUG) + logger.log(u"Attempting to cache item:[" + title + "]", logger.DEBUG) return self._addCacheEntry(title, url)