1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-27 10:06:52 +00:00

fix for Comic directory names that contain a /

This commit is contained in:
evilhero 2012-10-20 12:14:32 -04:00
parent c9acfb465f
commit 056aadf61e

View file

@ -115,9 +115,14 @@ def addComictoDB(comicid,mismatch=None):
# setup default location here
if comlocation is None:
if ':' in comic['ComicName']:
comicdir = comic['ComicName'].replace(':','')
if ':' in comic['ComicName'] or '/' in comic['ComicName']:
comicdir = comic['ComicName']
if ':' in comicdir:
comicdir = comicdir.replace(':','')
if '/' in comicdir:
comicdir = comicdir.replace('/','-')
else: comicdir = comic['ComicName']
comlocation = mylar.DESTINATION_DIR + "/" + comicdir + " (" + comic['ComicYear'] + ")"
if mylar.DESTINATION_DIR == "":
logger.error(u"There is no general directory specified - please specify in Config/Post-Processing.")
@ -410,8 +415,13 @@ def GCDimport(gcomicid):
#comic book location on machine
# setup default location here
if comlocation is None:
if ':' in ComicName:
comicdir = ComicName.replace(':','')
if ':' in ComicName or '/' in ComicName:
comicdir = ComicName
if ':' in comicdir:
comicdir = comicdir.replace(':','')
if '/' in comicdir:
comicdir = comicdir.replace('/','-')
else: comicdir = ComicName
comlocation = mylar.DESTINATION_DIR + "/" + comicdir + " (" + ComicYear + ")"
if mylar.DESTINATION_DIR == "":