Fix parsing of filenames that end with an ID such as [__######__]

This commit is contained in:
Andrew W. Buchanan 2022-04-04 22:34:31 -04:00
parent 558072a330
commit c9b5bd625f

View File

@ -89,7 +89,7 @@ class FileNameParser:
# is the series name followed by issue
filename = re.sub(r"--.*", self.repl, filename)
elif "__" in filename:
elif "__" in filename and not re.search('\\[__\\d+__\\]', filename):
# the pattern seems to be that anything to left of the first "__"
# is the series name followed by issue
filename = re.sub(r"__.*", self.repl, filename)