Browse Source

NZBsRus cleanup

pull/770/head
Ruud 13 years ago
parent
commit
3f35cba818
  1. 1
      couchpotato/core/providers/nzb/nzbsrus/__init__.py
  2. 11
      couchpotato/core/providers/nzb/nzbsrus/main.py

1
couchpotato/core/providers/nzb/nzbsrus/__init__.py

@ -11,6 +11,7 @@ config = [{
'subtab': 'providers',
'name': 'nzbsrus',
'label': 'Nzbsrus',
'description': 'See <a href="https://www.nzbsrus.com/">NZBsRus</a>',
'wizard': True,
'options': [
{

11
couchpotato/core/providers/nzb/nzbsrus/main.py

@ -9,7 +9,6 @@ import xml.etree.ElementTree as XMLTree
log = CPLog(__name__)
# See the api http://www.nzbsrus.com/NzbsrusAPI.pdf
class Nzbsrus(NZBProvider, RSS):
urls = {
@ -21,9 +20,6 @@ class Nzbsrus(NZBProvider, RSS):
cat_ids = [
([90, 45, 51], ['720p', '1080p', 'brrip', 'bd50', 'dvdr']),
([48, 51], ['cam', 'ts', 'dvdrip', 'tc', 'r5', 'scr']),
]
cat_backup_id = 240
@ -43,6 +39,7 @@ class Nzbsrus(NZBProvider, RSS):
'age': Env.setting('retention', section = 'nzb'),
})
# check for english_only
if self.conf('english_only'):
arguments += "&lang0=1&lang3=1&lang1=1"
@ -71,7 +68,6 @@ class Nzbsrus(NZBProvider, RSS):
size = int(round(int(self.getTextElement(nzb, "size")) / 1048576))
age = int(round((time.time() - int(self.getTextElement(nzb, "postdate"))) / 86400))
new = {
'id': id,
'type': 'nzb',
@ -88,7 +84,7 @@ class Nzbsrus(NZBProvider, RSS):
is_correct_movie = fireEvent('searcher.correct_movie',
nzb = new, movie = movie, quality = quality,
imdb_results = True, single_category = single_cat, single = True)
imdb_results = True, single = True)
if is_correct_movie:
new['score'] = fireEvent('score.calculate', new, movie, single = True)
@ -106,6 +102,3 @@ class Nzbsrus(NZBProvider, RSS):
def getApiExt(self):
return '/%s/' % (self.conf('userid'))
def isEnabled(self):
return NZBProvider.isEnabled(self) and self.conf('userid') and self.conf('api_key')

Loading…
Cancel
Save