1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-04 15:12:23 -05:00
This commit is contained in:
echel0n 2014-12-21 09:36:28 -08:00
parent b667c722f2
commit 009da64975
3 changed files with 5 additions and 8 deletions

View File

@ -125,7 +125,9 @@ class GenericProvider:
if not self._doLogin():
return
self.headers.update({'Referer': self.proxy.getProxyURL()})
if self.proxy.isEnabled():
self.headers.update({'Referer': self.proxy.getProxyURL()})
return helpers.getURL(self.proxy._buildURL(url), post_data=post_data, params=params, headers=self.headers, timeout=timeout,
session=self.session, json=json)

View File

@ -38,10 +38,6 @@ from sickbeard import logger
from sickbeard import tvcache
from sickbeard.exceptions import ex, AuthException
from lib import requests
from lib.requests import exceptions
from lib.bencode import bdecode
class NewznabProvider(generic.NZBProvider):
def __init__(self, name, url, key='', catIDs='5030,5040', search_mode='eponly', search_fallback=False,
enable_daily=False, enable_backlog=False):
@ -118,8 +114,6 @@ class NewznabProvider(generic.NZBProvider):
return (False, return_categories, "Error getting html for [%s]" %
("%s/api?%s" % (self.url, '&'.join("%s=%s" % (x,y) for x,y in params.items()) )))
#xml_categories = helpers.parse_xml(categories)
if not xml_categories:
logger.log(u"Error parsing xml for [%s]" % (self.name),
logger.DEBUG)

View File

@ -139,7 +139,8 @@ class TVCache():
logger.log(traceback.format_exc(), logger.DEBUG)
def getRSSFeed(self, url, post_data=None, items=[]):
self.provider.headers.update({'Referer': self.provider.proxy.getProxyURL()})
if self.provider.proxy.isEnabled():
self.provider.headers.update({'Referer': self.provider.proxy.getProxyURL()})
return RSSFeeds(self.providerID).getFeed(self.provider.proxy._buildURL(url), post_data, self.provider.headers, items)
def _translateTitle(self, title):