From bd9f3144961cc1c9a945e29ca326ca40183cdd41 Mon Sep 17 00:00:00 2001 From: "beville@gmail.com" Date: Sat, 22 Dec 2012 01:18:18 +0000 Subject: [PATCH] Some tweaks to issue number finder git-svn-id: http://comictagger.googlecode.com/svn/trunk@287 6c5673fe-1810-88d6-992b-cd32ca31540c --- filenameparser.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/filenameparser.py b/filenameparser.py index ef9eae5..06223ab 100644 --- a/filenameparser.py +++ b/filenameparser.py @@ -80,8 +80,11 @@ class FileNameParser: # first, look for multiple "--", this mean's it's formatted differently from most: if "--" in filename: - # the pattern seems to be that anything to left of the first "--" is the series name follow + # the pattern seems to be that anything to left of the first "--" is the series name followed by issue filename = filename.split("--")[0] + elif "___" in filename: + # the pattern seems to be that anything to left of the first "__" is the series name followed by issue + filename = filename.split("__")[0] # guess based on position @@ -99,7 +102,9 @@ class FileNameParser: # assume the last number in the filename that is under 4 digits is the issue number - for word in reversed(word_list): + for word in reversed(word_list): + if word[0] == "#": + word = word[1:] if ( (word.isdigit() and len(word) < 4) or (self.isPointIssue(word))