Skip to content

Commit

Permalink
Don't show built-in NN providers that don't need auth in the built-in…
Browse files Browse the repository at this point in the history
… providers list
  • Loading branch information
midgetspy committed May 11, 2011
1 parent 7c7e22d commit 017724b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions sickbeard/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,20 @@ def getNewznabProviderList(data):
if not curDefault:
continue

# a 0 in the key spot indicates that no key is needed, so set this on the object
if curDefault.key == '0':
curDefault.key = ''
curDefault.needs_auth = False

if curDefault.name not in providerDict:
curDefault.default = True
providerList.append(curDefault)
else:
providerDict[curDefault.name].default = True
providerDict[curDefault.name].name = curDefault.name
providerDict[curDefault.name].url = curDefault.url
providerDict[curDefault.name].needs_auth = curDefault.needs_auth

# a 0 in the key spot indicates that no key is needed, so set this on the object
if curDefault.key == '0':
curDefault.key = ''
curDefault.needs_auth = False

return filter(lambda x: x, providerList)


Expand Down

0 comments on commit 017724b

Please sign in to comment.