From afa782194d639340a6043d4b2065112383b59bdc Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 27 Aug 2014 22:04:33 +0200 Subject: [PATCH] Remove ending seperator --- couchpotato/core/plugins/renamer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/renamer.py b/couchpotato/core/plugins/renamer.py index 98a3a8c..fdc4329 100755 --- a/couchpotato/core/plugins/renamer.py +++ b/couchpotato/core/plugins/renamer.py @@ -847,13 +847,15 @@ Remove it if you want it to be renamed (again, or at least let it try again) replaces = [ ('\.+', '.'), ('_+', '_'), ('-+', '-'), ('\s+', ' '), (' \\\\', '\\\\'), (' /', '/'), - ('(\s\.)+', '.'), ('(-\.)+', '.'), ('(\s-)+', '-'), ('([\s\.\,\_\-\/\\]$)', ''), + ('(\s\.)+', '.'), ('(-\.)+', '.'), ('(\s-)+', '-'), ] for r in replaces: reg, replace_with = r string = re.sub(reg, replace_with, string) + string = string.rstrip(',_-/\\ ') + return string def checkSnatched(self, fire_scan = True):