IMP: re-enable notifications on manual PP

Remove the snatchedtorrent flag that was used to skip notifications for non-snatched files being processed by manual PP / folder monitoring. Justification is in 0-day pack processing, where the individual files on the wanted list are never set to snatched (and therefore no notifications are sent when they get pp'd using manual PP)
This commit is contained in:
barbequesauce 2018-08-02 09:56:39 -04:00 committed by GitHub
parent 4350d701e8
commit 7a5d5491f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 16 deletions

View File

@ -1707,10 +1707,9 @@ class PostProcessor(object):
if ml is not None and mylar.CONFIG.SNATCHEDTORRENT_NOTIFY:
snatchnzb = myDB.selectone("SELECT * from snatched WHERE IssueID=? AND ComicID=? AND (provider=? OR provider=? OR provider=? OR provider=?) AND Status='Snatched'", [issueid, comicid, 'TPSE', 'DEM', 'WWT', '32P']).fetchone()
if snatchnzb is None:
logger.fdebug(module + ' Was not snatched as a torrent. Disabling torrent manual post-processing completion notification.')
logger.fdebug(module + ' Was not snatched as a torrent. Using manual post-processing.')
else:
logger.fdebug(module + ' Was downloaded from ' + snatchnzb['Provider'] + '. Enabling torrent manual post-processing completion notification.')
snatchedtorrent = True
if issuenzb is None:
issuenzb = myDB.selectone("SELECT * from annuals WHERE issueid=? and comicid=?", [issueid, comicid]).fetchone()
annchk = "yes"
@ -2361,20 +2360,16 @@ class PostProcessor(object):
if ml is not None:
#we only need to return self.log if it's a manual run and it's not a snatched torrent
if snatchedtorrent:
#manual run + snatched torrent
pass
else:
#manual run + not snatched torrent (or normal manual-run)
logger.info(module + ' Post-Processing completed for: ' + series + ' ' + dispiss)
self._log(u"Post Processing SUCCESSFUL! ")
self.valreturn.append({"self.log": self.log,
"mode": 'stop',
"issueid": issueid,
"comicid": comicid})
if self.apicall is True:
self.sendnotify(series, issueyear, dispiss, annchk, module)
return self.queue.put(self.valreturn)
#manual run + not snatched torrent (or normal manual-run)
logger.info(module + ' Post-Processing completed for: ' + series + ' ' + dispiss)
self._log(u"Post Processing SUCCESSFUL! ")
self.valreturn.append({"self.log": self.log,
"mode": 'stop',
"issueid": issueid,
"comicid": comicid})
if self.apicall is True:
self.sendnotify(series, issueyear, dispiss, annchk, module)
return self.queue.put(self.valreturn)
self.sendnotify(series, issueyear, dispiss, annchk, module)