mirror of
https://github.com/evilhero/mylar
synced 2025-01-03 05:24:43 +00:00
FIX: fix for storyarc post-processing trying to copy items into storyarc directory, when storyarc directory option was not enabled (and also was not updating status in arc as to location/status), FIX: fix for DDL location having problems post-processing some items due to incorrect location being passed
This commit is contained in:
parent
3768a873b8
commit
afbade113d
1 changed files with 116 additions and 101 deletions
|
@ -1275,6 +1275,17 @@ class PostProcessor(object):
|
|||
if temploc is not None and fcdigit == helpers.issuedigits(ofv['Issue_Number']) or all([temploc is None, helpers.issuedigits(ofv['Issue_Number']) == '1']):
|
||||
if watchmatch['sub']:
|
||||
clocation = os.path.join(watchmatch['comiclocation'], watchmatch['sub'], helpers.conversion(watchmatch['comicfilename']))
|
||||
if not os.path.exists(clocation):
|
||||
scrubs = re.sub(watchmatch['comiclocation'], '', watchmatch['sub']).strip()
|
||||
if scrubs[:2] == '//' or scrubs[:2] == '\\':
|
||||
scrubs = scrubs[1:]
|
||||
if os.path.exists(scrubs):
|
||||
logger.fdebug('[MODIFIED CLOCATION] %s' % scrubs)
|
||||
clocation = scrubs
|
||||
|
||||
else:
|
||||
if self.issueid is not None and os.path.isfile(watchmatch['comiclocation']):
|
||||
clocation = watchmatch['comiclocation']
|
||||
else:
|
||||
clocation = os.path.join(watchmatch['comiclocation'],helpers.conversion(watchmatch['comicfilename']))
|
||||
oneoff_issuelist.append({"ComicLocation": clocation,
|
||||
|
@ -1296,13 +1307,14 @@ class PostProcessor(object):
|
|||
logger.fdebug('%s There are %s files found that match on your watchlist, %s files are considered one-off\'s, and %s files do not match anything' % (module, len(manual_list), len(oneoff_issuelist), int(filelist['comiccount']) - len(manual_list)))
|
||||
|
||||
delete_arc = []
|
||||
if len(manual_arclist) > 0: # and mylar.CONFIG.copy2arcdir is True:
|
||||
if len(manual_arclist) > 0:
|
||||
logger.info('[STORY-ARC MANUAL POST-PROCESSING] I have found %s issues that belong to Story Arcs. Flinging them into the correct directories.' % len(manual_arclist))
|
||||
for ml in manual_arclist:
|
||||
issueid = ml['IssueID']
|
||||
ofilename = orig_filename = ml['ComicLocation']
|
||||
logger.info('[STORY-ARC POST-PROCESSING] Enabled for %s' % ml['StoryArc'])
|
||||
|
||||
if all([mylar.CONFIG.STORYARCDIR is True, mylar.CONFIG.COPY2ARCDIR is True]):
|
||||
grdst = helpers.arcformat(ml['StoryArc'], helpers.spantheyears(ml['StoryArcID']), ml['Publisher'])
|
||||
logger.info('grdst: %s' % grdst)
|
||||
|
||||
|
@ -1407,9 +1419,12 @@ class PostProcessor(object):
|
|||
myDB.action('DELETE from nzblog WHERE IssueID=? AND SARC=?', [ml['IssueArcID'],ml['StoryArc']])
|
||||
|
||||
logger.fdebug('%s IssueArcID: %s' % (module, ml['IssueArcID']))
|
||||
ctrlVal = {"IssueArcID": ml['IssueArcID']}
|
||||
newVal = {"Status": "Downloaded",
|
||||
"Location": grab_dst}
|
||||
else:
|
||||
newVal = {"Status": "Downloaded",
|
||||
"Location": ml['ComicLocation']}
|
||||
ctrlVal = {"IssueArcID": ml['IssueArcID']}
|
||||
logger.fdebug('writing: %s -- %s' % (newVal, ctrlVal))
|
||||
myDB.upsert("storyarcs", newVal, ctrlVal)
|
||||
|
||||
|
|
Loading…
Reference in a new issue