From d0ccf9f27a2740466207bc2faa87cac114d5f333 Mon Sep 17 00:00:00 2001 From: vergessen Date: Wed, 18 Mar 2015 14:21:44 -0500 Subject: [PATCH] Fix release group not recognised from manually downloaded filename. --- CHANGES.md | 1 + sickbeard/name_parser/regexes.py | 5 +++-- sickbeard/tv.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 848c405d..af856ea6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -58,6 +58,7 @@ * Change the episodes downloaded stat to display e.g. 2843 / 2844 as 99.9% instead of rounding to 100% * Change 'never' episode row color away from blue on Display Show page when indexer airdate is not defined * Add tint to archived episode row colour to differentiate it from downloaded episodes on the Display Show page +* Fix release group not recognised from manually downloaded filename [develop changelog] * Fix traceback error when using the menu item Manage/Update Kodi diff --git a/sickbeard/name_parser/regexes.py b/sickbeard/name_parser/regexes.py index b9b58d30..ef1c89b2 100644 --- a/sickbeard/name_parser/regexes.py +++ b/sickbeard/name_parser/regexes.py @@ -270,7 +270,8 @@ anime_regexes = [ # Bleach.s16e03-04.313-314 # Bleach s16e03e04 313-314 ''' - ^(?P.+?)[ ._-]+ # start of string and series name and non optinal separator + ^(\[(?P.+?)\][ ._-]*)? + (?P.+?)[ ._-]+ # start of string and series name and non optinal separator [sS](?P\d+)[. _-]* # S01 and optional separator [eE](?P\d+) # epipisode E02 (([. _-]*e|-) # linking e/- char @@ -374,4 +375,4 @@ anime_regexes = [ -(?P[^- ]+))?)?$ # Group ''' ), -] \ No newline at end of file +] diff --git a/sickbeard/tv.py b/sickbeard/tv.py index 82d69e33..70513b74 100644 --- a/sickbeard/tv.py +++ b/sickbeard/tv.py @@ -436,7 +436,7 @@ class TVShow(object): except (InvalidNameException, InvalidShowException): pass - if not ' ' in ep_file_name and parse_result and parse_result.release_group: + if ep_file_name and parse_result and None is not parse_result.release_group: logger.log( u"Name " + ep_file_name + u" gave release group of " + parse_result.release_group + ", seems valid", logger.DEBUG)