From ab161f9d9cacb0143546fda8bc779d67ebea24f4 Mon Sep 17 00:00:00 2001 From: evilhero Date: Thu, 28 Sep 2017 10:05:44 -0400 Subject: [PATCH] FIX: When post-processing story-arc issues that were one-off's via usenet, would fail to continue post-processing due to some broken references, IMP: Threaded the retry option from the story arc detail page --- data/interfaces/default/storyarc_detail.html | 2 +- mylar/PostProcessor.py | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/data/interfaces/default/storyarc_detail.html b/data/interfaces/default/storyarc_detail.html index 50ef5ed3..fcce5797 100755 --- a/data/interfaces/default/storyarc_detail.html +++ b/data/interfaces/default/storyarc_detail.html @@ -156,7 +156,7 @@ %if any([item['Status'] is None, item['Status'] == None, item['Status'] == 'Skipped']): Grab %elif item['Status'] == 'Snatched': - Retry + Retry %elif item['Status'] == 'Downloaded' and item['Location'] is not None: Download %endif diff --git a/mylar/PostProcessor.py b/mylar/PostProcessor.py index 857567a1..8204ca07 100755 --- a/mylar/PostProcessor.py +++ b/mylar/PostProcessor.py @@ -1035,7 +1035,25 @@ class PostProcessor(object): 'sarc': sarc, 'oneoff': self.oneoff}) - elif all([self.oneoff is not None, mylar.ALT_PULL == 2]): + elif all([self.oneoff is not None, issueid[0] == 'S']): + issuearcid = re.sub('S', '', issueid).strip() + oneinfo = myDB.selectone("SELECT * FROM readinglist WHERE IssueArcID=?", [issuearcid]).fetchone() + if oneinfo is None: + logger.warn('Unable to locate issue as previously snatched arc issue - it might be something else...') + self._log('Unable to locate issue as previously snatched arc issue - it might be something else...') + else: + ppinfo.append({'comicid': oneinfo['ComicID'], + 'comicname': oneinfo['ComicName'], + 'issuenumber': oneinfo['IssueNumber'], + 'publisher': oneinfo['IssuePublisher'], + 'comiclocation': None, + 'issueid': issueid, #need to keep it so the 'S' is present to denote arc. + 'sarc': sarc, + 'oneoff': True}) + self.oneoff = True + + + if all([len(ppinfo) == 0, self.oneoff is not None, mylar.ALT_PULL == 2]): oneinfo = myDB.selectone('SELECT * FROM weekly WHERE IssueID=?', [issueid]).fetchone() if oneinfo is None: oneinfo = myDB.selectone('SELECT * FROM oneoffhistory WHERE IssueID=?', [issueid]).fetchone()