diff --git a/mylar/PostProcessor.py b/mylar/PostProcessor.py index 5a20f9e9..76d95bc4 100755 --- a/mylar/PostProcessor.py +++ b/mylar/PostProcessor.py @@ -241,8 +241,8 @@ class PostProcessor(object): #if ReleaseDate doesn't exist, use IssueDate #if no issue date was found, then ignore. issyr = None - logger.fdebug('issuedate:' + str(issuechk['IssueDate'])) - logger.fdebug('issuechk: ' + str(issuechk['IssueDate'][5:7])) + #logger.fdebug('issuedate:' + str(issuechk['IssueDate'])) + #logger.fdebug('issuechk: ' + str(issuechk['IssueDate'][5:7])) #logger.info('ReleaseDate: ' + str(issuechk['ReleaseDate'])) #logger.info('IssueDate: ' + str(issuechk['IssueDate'])) @@ -788,8 +788,12 @@ class PostProcessor(object): #downtype = for use with updater on history table to set status to 'Post-Processed' downtype = 'PP' #Manual Run, this is the portion. - logger.fdebug("Renaming " + os.path.join(self.nzb_folder, str(ofilename)) + " ..to.. " + os.path.join(self.nzb_folder,str(nfilename + ext))) - os.rename(os.path.join(self.nzb_folder, str(ofilename)), os.path.join(self.nzb_folder,str(nfilename + ext))) + if mylar.RENAME_FILES: + if str(ofilename) != str(nfilename + ext): + logger.fdebug("Renaming " + os.path.join(self.nzb_folder, str(ofilename)) + " ..to.. " + os.path.join(self.nzb_folder,str(nfilename + ext))) + os.rename(os.path.join(self.nzb_folder, str(ofilename)), os.path.join(self.nzb_folder,str(nfilename + ext))) + else: + logger.fdebug('filename is identical as original, not renaming.') src = os.path.join(self.nzb_folder, str(nfilename + ext)) logger.fdebug("Moving " + src + " ... to ... " + dst) try: diff --git a/mylar/filechecker.py b/mylar/filechecker.py index a78b6c85..8c4776ff 100755 --- a/mylar/filechecker.py +++ b/mylar/filechecker.py @@ -226,8 +226,8 @@ def listFiles(dir,watchcomic,Publisher,AlternateSearch=None,manual=None,sarc=Non #and adds to the subname. (Cases where comic name is $Series_$Year_$Issue) if len(subnm) > 1: if (re.search('(19\d{2}|20\d{2})',subnm[1]) is not None): - logger.fdebug('subnm0: ' + str(subnm[0])) - logger.fdebug('subnm1: ' + str(subnm[1])) + logger.fdebug('[FILECHECKER] subnm0: ' + str(subnm[0])) + logger.fdebug('[FILECHECKER] subnm1: ' + str(subnm[1])) # logger.fdebug('subnm2: ' + str(subnm[2])) subname = str(subnm[0]).lstrip() + ' (' + str(subnm[1]).strip() + ') ' subnm = re.findall('[^()]+', subname) # we need to regenerate this here.