From 44a8dc6815d0d28cd575d41f60488be5539d16f6 Mon Sep 17 00:00:00 2001 From: "beville@gmail.com" Date: Mon, 11 Mar 2013 23:18:07 +0000 Subject: [PATCH] Fixed flawed RE assumption when parsing issue number with # in front. Now properly handle issues with decimal point git-svn-id: http://comictagger.googlecode.com/svn/trunk@543 6c5673fe-1810-88d6-992b-cd32ca31540c --- comictaggerlib/filenameparser.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/comictaggerlib/filenameparser.py b/comictaggerlib/filenameparser.py index ef8aa73..ab1740d 100644 --- a/comictaggerlib/filenameparser.py +++ b/comictaggerlib/filenameparser.py @@ -112,14 +112,12 @@ class FileNameParser: # first look for the last "#" followed by a digit in the filename. this is almost certainly the issue number #issnum = re.search('#\d+', filename) - matchlist = re.findall("#\d+", filename) + matchlist = re.findall("#[-+]?([0-9]*\.[0-9]+|[0-9]+)", filename) if len(matchlist) > 0: #get the last item issue = matchlist[ len(matchlist) - 1] - issue = issue[1:] found = True - # assume the last number in the filename that is under 4 digits is the issue number if not found: for word in reversed(word_list):