From 20eb14192fbb9ff1a6b6d1364ce077f529f864da Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Mon, 1 Feb 2010 10:50:21 +0000 Subject: [PATCH] Fixed regex parser to identify shows without epnames --- tvorganise/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tvorganise/__init__.py b/tvorganise/__init__.py index 9aa43c6..1fb0657 100755 --- a/tvorganise/__init__.py +++ b/tvorganise/__init__.py @@ -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()