1
0
mirror of https://github.com/moparisthebest/SickRage synced 2025-01-07 03:48:02 -05:00

Removed a extra space that may have caused issues in future

This commit is contained in:
echel0n 2014-05-17 06:55:58 -07:00
parent 22ec1a4418
commit 12b8fc9990

View File

@ -32,7 +32,6 @@ except ImportError:
class HDBitsProvider(generic.TorrentProvider): class HDBitsProvider(generic.TorrentProvider):
def __init__(self): def __init__(self):
generic.TorrentProvider.__init__(self, "HDBits") generic.TorrentProvider.__init__(self, "HDBits")
@ -68,8 +67,10 @@ class HDBitsProvider(generic.TorrentProvider):
if 'status' in parsedJSON and 'message' in parsedJSON: if 'status' in parsedJSON and 'message' in parsedJSON:
if parsedJSON.get('status') == 5: if parsedJSON.get('status') == 5:
logger.log(u"Incorrect authentication credentials for " + self.name + " : " + parsedJSON['message'], logger.DEBUG) logger.log(u"Incorrect authentication credentials for " + self.name + " : " + parsedJSON['message'],
raise AuthException("Your authentication credentials for " + self.name + " are incorrect, check your config.") logger.DEBUG)
raise AuthException(
"Your authentication credentials for " + self.name + " are incorrect, check your config.")
return True return True
@ -147,7 +148,8 @@ class HDBitsProvider(generic.TorrentProvider):
post_data = { post_data = {
'username': self.username, 'username': self.username,
'passkey': self.password, 'passkey': self.password,
'category': [2], # TV Category 'category': [2],
# TV Category
} }
if episode: if episode:
@ -179,7 +181,6 @@ class HDBitsProvider(generic.TorrentProvider):
class HDBitsCache(tvcache.TVCache): class HDBitsCache(tvcache.TVCache):
def __init__(self, provider): def __init__(self, provider):
tvcache.TVCache.__init__(self, provider) tvcache.TVCache.__init__(self, provider)
@ -215,7 +216,8 @@ class HDBitsCache(tvcache.TVCache):
if parsedJSON and 'data' in parsedJSON: if parsedJSON and 'data' in parsedJSON:
items = parsedJSON['data'] items = parsedJSON['data']
else: else:
logger.log(u"Resulting JSON from " + self.provider.name + " isn't correct, not parsing it", logger.ERROR) logger.log(u"Resulting JSON from " + self.provider.name + " isn't correct, not parsing it",
logger.ERROR)
return [] return []
ql = [] ql = []
@ -231,7 +233,8 @@ class HDBitsCache(tvcache.TVCache):
myDB.mass_action(ql) myDB.mass_action(ql)
else: else:
raise exceptions.AuthException("Your authentication info for " + self.provider.name + " is incorrect, check your config") raise exceptions.AuthException(
"Your authentication info for " + self.provider.name + " is incorrect, check your config")
else: else:
return [] return []
@ -247,10 +250,12 @@ class HDBitsCache(tvcache.TVCache):
logger.log(u"Adding item to results: " + title, logger.DEBUG) logger.log(u"Adding item to results: " + title, logger.DEBUG)
return self._addCacheEntry(title, url) return self._addCacheEntry(title, url)
else: else:
logger.log(u"The data returned from the " + self.provider.name + " is incomplete, this result is unusable", logger.ERROR) logger.log(u"The data returned from the " + self.provider.name + " is incomplete, this result is unusable",
logger.ERROR)
return None return None
def _checkAuth(self, data): def _checkAuth(self, data):
return self.provider._checkAuthFromData(data) return self.provider._checkAuthFromData(data)
provider = HDBitsProvider() provider = HDBitsProvider()