From d2e03646d2b6e245901e6bb44b750ccf37046cec Mon Sep 17 00:00:00 2001 From: evilhero Date: Mon, 14 Jan 2019 21:52:53 -0500 Subject: [PATCH] FIX: Fix for TPB/One-Shot file rechecking expecting an issue number, but one not being present due to the type --- mylar/updater.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/mylar/updater.py b/mylar/updater.py index 7a4c5adb..d63c7c22 100755 --- a/mylar/updater.py +++ b/mylar/updater.py @@ -1093,12 +1093,17 @@ def forceRescan(ComicID, archive=None, module=None, recheck=False): return else: break + if tmpfc['JusttheDigits'] is not None: temploc= tmpfc['JusttheDigits'].replace('_', ' ') temploc = re.sub('[\#\']', '', temploc) logger.fdebug('temploc: %s' % temploc) else: - temploc = None + #assume 1 if not given + if any([booktype == 'TPB', booktype == 'One-Shot']): + temploc = '1' + else: + temploc = None if all(['annual' not in temploc.lower(), 'special' not in temploc.lower()]): #remove the extension here @@ -1123,7 +1128,11 @@ def forceRescan(ComicID, archive=None, module=None, recheck=False): fnd_iss_except = 'None' - fcdigit = helpers.issuedigits(temploc) + if temploc is not None: + fcdigit = helpers.issuedigits(temploc) + elif any([booktype == 'TPB', booktype == 'One-Shot']) and temploc is None: + fcdigit = helpers.issuedigits('1') + if int(fcdigit) == int_iss: logger.fdebug(module + ' [' + str(reiss['IssueID']) + '] Issue match - fcdigit: ' + str(fcdigit) + ' ... int_iss: ' + str(int_iss))