mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-22 08:53:59 +01:00
Fixing if NZB contains a file out of your retention
This commit is contained in:
@@ -496,10 +496,15 @@ def preprocess(resultlist):
|
|||||||
d = minidom.parseString(nzb)
|
d = minidom.parseString(nzb)
|
||||||
node = d.documentElement
|
node = d.documentElement
|
||||||
nzbfiles = d.getElementsByTagName("file")
|
nzbfiles = d.getElementsByTagName("file")
|
||||||
|
skipping = False
|
||||||
for nzbfile in nzbfiles:
|
for nzbfile in nzbfiles:
|
||||||
if nzbfile.getAttribute("date") < (time.time() - usenet_retention * 86400):
|
if int(nzbfile.getAttribute("date")) < (time.time() - usenet_retention * 86400):
|
||||||
logger.error('NZB contains a file out of your retention. Skipping.')
|
logger.info('NZB contains a file out of your retention. Skipping.')
|
||||||
continue
|
skipping = True
|
||||||
|
break
|
||||||
|
if skipping:
|
||||||
|
continue
|
||||||
|
|
||||||
#TODO: Do we want rar checking in here to try to keep unknowns out?
|
#TODO: Do we want rar checking in here to try to keep unknowns out?
|
||||||
#or at least the option to do so?
|
#or at least the option to do so?
|
||||||
except ExpatError:
|
except ExpatError:
|
||||||
|
|||||||
Reference in New Issue
Block a user