FIX:(#721) post-processing would succeed, but exit code returned in sabnzbd, FIX:(#716) If series in watchlist has decimals in title, will check match against filename before proceeding further during post-processing (this could be an on-going type of fix that's needed)

This commit is contained in:
evilhero 2014-05-30 14:10:46 -04:00
parent a1ef71c881
commit b20449803d
2 changed files with 6 additions and 2 deletions

View File

@ -172,6 +172,10 @@ def listFiles(dir,watchcomic,Publisher,AlternateSearch=None,manual=None,sarc=Non
subthis = re.sub('.cbz', '', subthis)
subthis = re.sub('[\:\;\!\'\/\?\+\=\_\%\.]', '', subthis)
logger.fdebug('[FILECHECKER] sub-cleaned: ' + str(subthis))
#we need to make sure the file is part of the correct series or else will match falsely
if watchname not in subthis:
logger.fdebug('[FILECHECKER] this is a false match. Ignoring this result.')
continue
subthis = subthis[len(watchname):] #remove watchcomic
#we need to now check the remainder of the string for digits assuming it's a possible year
logger.fdebug('[FILECHECKER] new subname: ' + str(subthis))
@ -351,7 +355,7 @@ def listFiles(dir,watchcomic,Publisher,AlternateSearch=None,manual=None,sarc=Non
#same = encode.
u_altsearchcomic = AS_Alternate.encode('ascii', 'ignore').strip()
altsearchcomic = re.sub('[\_\#\,\/\:\;\.\!\$\%\+\'\?\@]', ' ', u_altsearchcomic)
altsearchcomic = re.sub('[\-]', '', altsearchcomic)
altsearchcomic = re.sub('[\-]', ' ', altsearchcomic) #because this is a watchcomic registered, use same algorithim for watchcomic
altsearchcomic = re.sub('\&', ' and ', altsearchcomic)
altsearchcomic = re.sub('\s+', ' ', str(altsearchcomic)).strip()
AS_Alt.append(altsearchcomic)

View File

@ -474,7 +474,7 @@ class WebInterface(object):
threading.Thread(target=PostProcess.Process).start()
raise cherrypy.HTTPRedirect("home")
else:
result = threading.Thread(target=PostProcess.Process).start()
result = PostProcess.Process()
return result
#log2screen = threading.Thread(target=PostProcessor.PostProcess, args=[nzb_name,nzb_folder]).start()
#return serve_template(templatename="postprocess.html", title="postprocess")