mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-22 08:53:59 +01:00
Merge remote-tracking branch 'clashlab/patch-1' into develop
This commit is contained in:
@@ -348,18 +348,18 @@ def searchNZB(albumid=None, new=False, losslessOnly=False):
|
|||||||
|
|
||||||
if data:
|
if data:
|
||||||
|
|
||||||
d = feedparser.parse(data)
|
d = eval(data.replace('null','None'))
|
||||||
|
|
||||||
if not len(d.entries):
|
if d['matches'] <= 0:
|
||||||
logger.info(u"No results found from NZBsRus for %s" % term)
|
logger.info(u"No results found from NZBsRus for %s" % term)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
else:
|
else:
|
||||||
for item in d.entries:
|
for item in d['results']:
|
||||||
try:
|
try:
|
||||||
url = item.link
|
url = "http://www.nzbsrus.com/nzbdownload_rss.php/" + item['id'] + "/" + headphones.NZBSRUS_UID + "/" + item['key']
|
||||||
title = item.title
|
title = item['name']
|
||||||
size = int(item.links[1]['length'])
|
size = int(item['size'])
|
||||||
|
|
||||||
resultlist.append((title, size, url, provider))
|
resultlist.append((title, size, url, provider))
|
||||||
logger.info('Found %s. Size: %s' % (title, helpers.bytes_to_mb(size)))
|
logger.info('Found %s. Size: %s' % (title, helpers.bytes_to_mb(size)))
|
||||||
|
|||||||
Reference in New Issue
Block a user