mirror of
https://github.com/evilhero/mylar
synced 2025-02-24 23:02:23 +00:00
FIX:(#1304) Fix for rename problem when series title is utf-8 encoded during an import sequence
This commit is contained in:
parent
5399f6dfcc
commit
a8bef2e7f3
1 changed files with 8 additions and 8 deletions
|
@ -247,7 +247,7 @@ def rename_param(comicid, comicname, issue, ofilename, comicyear=None, issueid=N
|
||||||
import db, logger
|
import db, logger
|
||||||
myDB = db.DBConnection()
|
myDB = db.DBConnection()
|
||||||
logger.fdebug('comicid: ' + str(comicid))
|
logger.fdebug('comicid: ' + str(comicid))
|
||||||
logger.fdebug('issue#: ' + str(issue))
|
logger.fdebug('issue#: ' + issue)
|
||||||
# the issue here is a non-decimalized version, we need to see if it's got a decimal and if not, add '.00'
|
# the issue here is a non-decimalized version, we need to see if it's got a decimal and if not, add '.00'
|
||||||
# iss_find = issue.find('.')
|
# iss_find = issue.find('.')
|
||||||
# if iss_find < 0:
|
# if iss_find < 0:
|
||||||
|
@ -422,7 +422,7 @@ def rename_param(comicid, comicname, issue, ofilename, comicyear=None, issueid=N
|
||||||
else:
|
else:
|
||||||
iss = issuenum
|
iss = issuenum
|
||||||
issueno = str(iss)
|
issueno = str(iss)
|
||||||
logger.fdebug('iss:' + str(iss))
|
logger.fdebug('iss:' + iss)
|
||||||
logger.fdebug('issueno:' + str(issueno))
|
logger.fdebug('issueno:' + str(issueno))
|
||||||
# issue zero-suppression here
|
# issue zero-suppression here
|
||||||
if mylar.ZERO_LEVEL == "0":
|
if mylar.ZERO_LEVEL == "0":
|
||||||
|
@ -507,10 +507,10 @@ def rename_param(comicid, comicname, issue, ofilename, comicyear=None, issueid=N
|
||||||
if month_name is None:
|
if month_name is None:
|
||||||
month_name = 'None'
|
month_name = 'None'
|
||||||
logger.fdebug('Issue Year : ' + str(issueyear))
|
logger.fdebug('Issue Year : ' + str(issueyear))
|
||||||
logger.fdebug('Publisher: ' + str(publisher))
|
logger.fdebug('Publisher: ' + publisher)
|
||||||
logger.fdebug('Series: ' + str(series))
|
logger.fdebug('Series: ' + series)
|
||||||
logger.fdebug('Year: ' + str(seriesyear))
|
logger.fdebug('Year: ' + str(seriesyear))
|
||||||
logger.fdebug('Comic Location: ' + str(comlocation))
|
logger.fdebug('Comic Location: ' + comlocation)
|
||||||
if comversion is None:
|
if comversion is None:
|
||||||
comversion = 'None'
|
comversion = 'None'
|
||||||
#if comversion is None, remove it so it doesn't populate with 'None'
|
#if comversion is None, remove it so it doesn't populate with 'None'
|
||||||
|
@ -626,15 +626,15 @@ def rename_param(comicid, comicname, issue, ofilename, comicyear=None, issueid=N
|
||||||
nfilename = nfilename.replace(' ', mylar.REPLACE_CHAR)
|
nfilename = nfilename.replace(' ', mylar.REPLACE_CHAR)
|
||||||
|
|
||||||
nfilename = re.sub('[\,\:]', '', nfilename) + ext.lower()
|
nfilename = re.sub('[\,\:]', '', nfilename) + ext.lower()
|
||||||
logger.fdebug('New Filename: ' + str(nfilename))
|
logger.fdebug('New Filename: ' + nfilename)
|
||||||
|
|
||||||
if mylar.LOWERCASE_FILENAMES:
|
if mylar.LOWERCASE_FILENAMES:
|
||||||
dst = os.path.join(comlocation, nfilename.lower())
|
dst = os.path.join(comlocation, nfilename.lower())
|
||||||
else:
|
else:
|
||||||
dst = os.path.join(comlocation, nfilename)
|
dst = os.path.join(comlocation, nfilename)
|
||||||
|
|
||||||
logger.fdebug('Source: ' + str(ofilename))
|
logger.fdebug('Source: ' + ofilename)
|
||||||
logger.fdebug('Destination: ' + str(dst))
|
logger.fdebug('Destination: ' + dst)
|
||||||
|
|
||||||
rename_this = {"destination_dir": dst,
|
rename_this = {"destination_dir": dst,
|
||||||
"nfilename": nfilename,
|
"nfilename": nfilename,
|
||||||
|
|
Loading…
Reference in a new issue