Use same api call for all qualities. closes #1164

This commit is contained in:
Ruud
2012-12-21 23:17:42 +01:00
parent e2f59f5ff4
commit 6c7c4c7aba

View File

@@ -25,13 +25,7 @@ class Newznab(NZBProvider, RSS):
limits_reached = {}
cat_ids = [
([2010], ['dvdr']),
([2030], ['cam', 'ts', 'dvdrip', 'tc', 'r5', 'scr']),
([2040], ['720p', '1080p']),
([2050], ['bd50']),
]
cat_backup_id = 2000
cat_backup_id = '2000'
http_time_between_calls = 1 # Seconds
@@ -89,13 +83,13 @@ class Newznab(NZBProvider, RSS):
cat_id = self.getCatId(quality['identifier'])
arguments = tryUrlencode({
'imdbid': movie['library']['identifier'].replace('tt', ''),
'cat': cat_id[0],
'cat': ','.join(cat_id),
'apikey': host['api_key'],
'extended': 1
})
url = "%s&%s" % (self.getUrl(host['host'], self.urls['search']), arguments)
cache_key = 'newznab.%s.%s.%s' % (host['host'], movie['library']['identifier'], cat_id[0])
cache_key = 'newznab.%s.%s.%s' % (host['host'], movie['library']['identifier'], cat_id)
results = self.createItems(url, cache_key, host, movie = movie, quality = quality)