Fix for spotweb date not available
This commit is contained in:
@@ -113,12 +113,17 @@ class Newznab(NZBProvider, RSS):
|
||||
results = []
|
||||
for nzb in nzbs:
|
||||
|
||||
date = ''
|
||||
size = 0
|
||||
for item in nzb:
|
||||
if item.attrib.get('name') == 'size':
|
||||
size = item.attrib.get('value')
|
||||
elif item.attrib.get('name') == 'usenetdate':
|
||||
date = item.attrib.get('value')
|
||||
|
||||
if date is '': log.info('Date not parsed properly or not available for %s: %s' % (host, self.getTextElement(nzb, "title")))
|
||||
if size is 0: log.info('Size not parsed properly or not available for %s: %s' % (host, self.getTextElement(nzb, "title")))
|
||||
|
||||
id = self.getTextElement(nzb, "guid").split('/')[-1:].pop()
|
||||
new = {
|
||||
'id': id,
|
||||
|
||||
Reference in New Issue
Block a user