Browse Source

Fixes #6489 - Was comparing string against dictionary key without checking if the key existed first.

pull/6491/head
Ryan 9 years ago
parent
commit
8569ef7dbb
  1. 9
      couchpotato/core/media/_base/providers/torrent/hd4free.py

9
couchpotato/core/media/_base/providers/torrent/hd4free.py

@ -25,10 +25,11 @@ class Base(TorrentProvider):
def _search(self, movie, quality, results):
data = self.getJsonData(self.urls['search'] % (self.conf('apikey'), self.conf('username'), getIdentifier(movie), self.conf('internal_only')))
if data:
if self.login_fail_msg in data['error']: # Check for login failure
self.disableAccount()
return
if 'error' in data:
if data:
if self.login_fail_msg in data['error']: # Check for login failure
self.disableAccount()
return
try:
#for result in data[]:

Loading…
Cancel
Save