From ee70efe082bc1a533dcc0de3635d0a3db594ef84 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Wed, 25 Oct 2017 04:31:49 +0100 Subject: [PATCH] Add file name to possible names in history lookup post processing. Add garbage name handling to name parser. --- CHANGES.md | 2 ++ sickbeard/name_parser/parser.py | 3 +++ sickbeard/name_parser/regexes.py | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 9ca79e83..312e8f49 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -115,6 +115,8 @@ * Change improve handling of relative download links from providers * Change enable TorrentBytes provider * Change after SG is updated, don't attempt to send a Plex client notifications if there is no client host set +* Add file name to possible names in history lookup post processing +* Add garbage name handling to name parser [develop changelog] diff --git a/sickbeard/name_parser/parser.py b/sickbeard/name_parser/parser.py index 303a6e3d..bc9e1027 100644 --- a/sickbeard/name_parser/parser.py +++ b/sickbeard/name_parser/parser.py @@ -115,6 +115,9 @@ class NameParser(object): if not match: continue + if 'garbage_name' == cur_regex_name: + return + result = ParseResult(new_name) result.which_regex = [cur_regex_name] result.score = 0 - cur_regex_num diff --git a/sickbeard/name_parser/regexes.py b/sickbeard/name_parser/regexes.py index fa048a44..d6420e41 100644 --- a/sickbeard/name_parser/regexes.py +++ b/sickbeard/name_parser/regexes.py @@ -19,6 +19,11 @@ # all regexes are case insensitive normal_regexes = [ + ('garbage_name', + ''' + ^[a-zA-Z0-9]{3,}$ + ''' + ), ('standard_repeat', # Show.Name.S01E02.S01E03.Source.Quality.Etc-Group # Show Name - S01E02 - S01E03 - S01E04 - Ep Name