mirror of https://github.com/evilhero/mylar
FIX: Fix for publisher name having unicode characters and in the Folder Format field, FIX: Manual Post-Processing would incorrectly filesafe the source filename before attempting to copy which resulted in aborted post-processing, FIX: If search would attempt to grab an invalid nzb, will return as a failed entry and continue to next result
This commit is contained in:
parent
d7e7ab80a1
commit
fda491e2fc
|
@ -731,7 +731,7 @@ class PostProcessor(object):
|
|||
# comicnzb= myDB.action("SELECT * from comics WHERE comicid=?", [comicid]).fetchone()
|
||||
publisher = comicnzb['ComicPublisher']
|
||||
self._log("Publisher: " + publisher)
|
||||
logger.fdebug(module + ' Publisher: ' + str(publisher))
|
||||
logger.fdebug(module + ' Publisher: ' + publisher)
|
||||
#we need to un-unicode this to make sure we can write the filenames properly for spec.chars
|
||||
series = comicnzb['ComicName'].encode('ascii', 'ignore').strip()
|
||||
self._log("Series: " + series)
|
||||
|
@ -983,8 +983,8 @@ class PostProcessor(object):
|
|||
os.rename(os.path.join(odir, str(ofilename)), os.path.join(odir ,str(nfilename + ext)))
|
||||
else:
|
||||
logger.fdebug(module + ' Filename is identical as original, not renaming.')
|
||||
src = os.path.join(odir, nfilename + ext)
|
||||
logger.fdebug(module + ' odir src : ' + os.path.join(odir, nfilename + ext))
|
||||
src = os.path.join(odir, ofilename)
|
||||
logger.fdebug(module + ' odir src : ' + os.path.join(odir, ofilename + ext))
|
||||
logger.fdebug(module + ' Moving ' + src + ' ... to ... ' + dst)
|
||||
try:
|
||||
shutil.move(src, dst)
|
||||
|
|
|
@ -320,6 +320,7 @@ def addComictoDB(comicid,mismatch=None,pullupd=None,imported=None,ogcname=None,c
|
|||
comicdir = comicname_filesafe
|
||||
series = comicdir
|
||||
publisher = re.sub('!','',comic['ComicPublisher']) # thanks Boom!
|
||||
publisher = helpers.filesafe(publisher)
|
||||
year = SeriesYear
|
||||
comversion = comic['ComicVersion']
|
||||
if comversion is None:
|
||||
|
|
|
@ -48,10 +48,10 @@ def search_init(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueD
|
|||
if ComicYear == None: ComicYear = '2014'
|
||||
else: ComicYear = str(ComicYear)[:4]
|
||||
if Publisher == 'IDW Publishing': Publisher = 'IDW'
|
||||
logger.fdebug('Publisher is : ' + str(Publisher))
|
||||
logger.fdebug('Publisher is : ' + Publisher)
|
||||
|
||||
issuetitle = helpers.get_issue_title(IssueID)
|
||||
logger.info('Issue Title given as : ' + str(issuetitle))
|
||||
logger.info('Issue Title given as : ' + issuetitle)
|
||||
|
||||
if mode == 'want_ann':
|
||||
logger.info("Annual issue search detected. Appending to issue #")
|
||||
|
@ -1662,6 +1662,10 @@ def searcher(nzbprov, nzbname, comicinfo, link, IssueID, ComicID, tmpprov, direc
|
|||
filen = item[item.index("filename=") + 9:].strip(';').strip('"')
|
||||
logger.fdebug('nzo_info:' + str(nzo_info))
|
||||
|
||||
if filen is None and mylar.FAILED_DOWNLOAD_HANDLING:
|
||||
logger.fdebug('[FAILED_DOWNLOAD] [' + str(tmpprov) + '] Marked as a bad download : ' + str(link))
|
||||
return "downloadchk-fail"
|
||||
|
||||
#convert to a generic type of format to help with post-processing.
|
||||
filen = re.sub('.cbr', '', filen).strip()
|
||||
filen = re.sub('.cbz', '', filen).strip()
|
||||
|
|
Loading…
Reference in New Issue