Added a hack that will probably be removed

git-svn-id: http://comictagger.googlecode.com/svn/trunk@19 6c5673fe-1810-88d6-992b-cd32ca31540c
This commit is contained in:
beville@gmail.com 2012-11-09 21:02:59 +00:00
parent 1486cce990
commit b2c3674afd

View File

@ -127,16 +127,26 @@ class FileNameParser:
def parseFilename( self, filename ):
# remove the path
filename = os.path.basename(filename)
# remove the extension
filename = os.path.splitext(filename)[0]
#url decvocde, just in case
#url decode, just in case
filename = unquote(filename)
# ----HACK
# remove the first word that word is a 3 digit number.
# some story arcs collection packs do this, but it's ugly
# this will probably break something, i.e. "100 bullets"
word = filename.split(' ')[0]
if len(word) == 3 and word[0] =='0' and word.isdigit():
filename = filename[4:]
# ----HACK -
self.issue = self.getIssueNumber(filename)
self.series, self.volume = self.getSeriesName(filename, self.issue)
self.year = self.getYear(filename)