This commit is contained in:
RicterZ 2019-06-04 08:38:42 +08:00
parent a909ad6d92
commit 1172282362
2 changed files with 1 additions and 2 deletions

View File

@ -41,7 +41,7 @@ class Doujinshi(object):
name_format = name_format.replace('%a', self.info.artists)
name_format = name_format.replace('%t', self.name)
name_format = name_format.replace('%s', self.info.subtitle)
self.filename = name_format
self.filename = format_filename(name_format)
def __repr__(self):
return '<Doujinshi: {0}>'.format(self.name)

View File

@ -178,7 +178,6 @@ an invalid filename.
"""
valid_chars = "-_.()[] %s%s" % (string.ascii_letters, string.digits)
filename = ''.join(c for c in s if c in valid_chars)
filename = filename.replace(' ', '_') # I don't like spaces in filenames.
if len(filename) > 100:
filename = filename[:100] + '...]'