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. 1
      couchpotato/core/media/_base/providers/torrent/hd4free.py

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

@ -25,6 +25,7 @@ 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 'error' in data:
if data:
if self.login_fail_msg in data['error']: # Check for login failure
self.disableAccount()

Loading…
Cancel
Save