mirror of https://github.com/evilhero/mylar
FIX: Fix for cached RSS Feed returns which did not have a filesize in the db, FIX:(#1372) Fixed renamer / post-processor to handle quotation marks in filenames (replace character)
This commit is contained in:
parent
acf0f87a2b
commit
cff37bc6a7
|
@ -1658,8 +1658,8 @@ class PostProcessor(object):
|
||||||
if mylar.REPLACE_SPACES:
|
if mylar.REPLACE_SPACES:
|
||||||
#mylar.REPLACE_CHAR ...determines what to replace spaces with underscore or dot
|
#mylar.REPLACE_CHAR ...determines what to replace spaces with underscore or dot
|
||||||
nfilename = nfilename.replace(' ', mylar.REPLACE_CHAR)
|
nfilename = nfilename.replace(' ', mylar.REPLACE_CHAR)
|
||||||
nfilename = re.sub('[\,\:\?]', '', nfilename)
|
nfilename = re.sub('[\,\:\?\"\']', '', nfilename)
|
||||||
nfilename = re.sub('[\/]', '-', nfilename)
|
nfilename = re.sub('[\/\*]', '-', nfilename)
|
||||||
self._log("New Filename: " + nfilename)
|
self._log("New Filename: " + nfilename)
|
||||||
logger.fdebug(module + ' New Filename: ' + nfilename)
|
logger.fdebug(module + ' New Filename: ' + nfilename)
|
||||||
|
|
||||||
|
|
|
@ -579,11 +579,13 @@ def rename_param(comicid, comicname, issue, ofilename, comicyear=None, issueid=N
|
||||||
logger.fdebug('Annual detected within series title of ' + series + '. Not auto-correcting issue #')
|
logger.fdebug('Annual detected within series title of ' + series + '. Not auto-correcting issue #')
|
||||||
|
|
||||||
seriesfilename = seriesfilename.encode('ascii', 'ignore').strip()
|
seriesfilename = seriesfilename.encode('ascii', 'ignore').strip()
|
||||||
filebad = [':', ',', '/', '?', '!', '\''] #in u_comicname or '/' in u_comicname or ',' in u_comicname or '?' in u_comicname:
|
filebad = [':', ',', '/', '?', '!', '\'', '\"', '\*'] #in u_comicname or '/' in u_comicname or ',' in u_comicname or '?' in u_comicname:
|
||||||
for dbd in filebad:
|
for dbd in filebad:
|
||||||
if dbd in seriesfilename:
|
if dbd in seriesfilename:
|
||||||
if dbd == '/': repthechar = '-'
|
if any([dbd == '/', dbd == '*']):
|
||||||
else: repthechar = ''
|
repthechar = '-'
|
||||||
|
else:
|
||||||
|
repthechar = ''
|
||||||
seriesfilename = seriesfilename.replace(dbd, repthechar)
|
seriesfilename = seriesfilename.replace(dbd, repthechar)
|
||||||
logger.fdebug('Altering series name due to filenaming restrictions: ' + seriesfilename)
|
logger.fdebug('Altering series name due to filenaming restrictions: ' + seriesfilename)
|
||||||
|
|
||||||
|
|
|
@ -757,7 +757,7 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa
|
||||||
logger.fdebug('Quality restriction enforced [ .cbz only ]. Rejecting this result.')
|
logger.fdebug('Quality restriction enforced [ .cbz only ]. Rejecting this result.')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if comsize_b is None:
|
if comsize_b is None or comsize_b == '0':
|
||||||
logger.fdebug('Size of file cannot be retrieved. Ignoring size-comparison and continuing.')
|
logger.fdebug('Size of file cannot be retrieved. Ignoring size-comparison and continuing.')
|
||||||
#comsize_b = 0
|
#comsize_b = 0
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue