Fixed regex parser to identify shows without epnames

This commit is contained in:
2010-02-01 10:50:21 +00:00
parent 8d26a1a273
commit 20eb14192f

View File

@@ -82,7 +82,13 @@ class TvOrganiser():
for regex in self._config['regex']:
match = regex.match(filename)
if match:
showname, seasno, epno, epname = match.groups()
self._logger.debug(match.groups())
if len(match.groups()) == 4:
showname, seasno, epno, epname = match.groups()
else:
showname, seasno, epno = match.groups()
epname = ""
#remove ._- characters from name
showname = re.sub("[\._]|\-(?=$)", " ", showname).strip()