From 8fd72f0a194d95f6d4697bcb9c5567d24dba12fe Mon Sep 17 00:00:00 2001 From: PierreAronnax Date: Sun, 25 Sep 2011 11:51:26 +0300 Subject: [PATCH] Fixing if NZB contains a file out of your retention --- headphones/searcher.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/headphones/searcher.py b/headphones/searcher.py index 84979a0e..43a474db 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -496,10 +496,15 @@ def preprocess(resultlist): d = minidom.parseString(nzb) node = d.documentElement nzbfiles = d.getElementsByTagName("file") + skipping = False for nzbfile in nzbfiles: - if nzbfile.getAttribute("date") < (time.time() - usenet_retention * 86400): - logger.error('NZB contains a file out of your retention. Skipping.') - continue + if int(nzbfile.getAttribute("date")) < (time.time() - usenet_retention * 86400): + logger.info('NZB contains a file out of your retention. Skipping.') + skipping = True + break + if skipping: + continue + #TODO: Do we want rar checking in here to try to keep unknowns out? #or at least the option to do so? except ExpatError: