Permalink
Browse files

Sanitize _format_string endresult only

  • Loading branch information...
1 parent 37ad245 commit 36e39df669bb59c7d456b122ee045ef207ff95b1 Patrick Vos committed Sep 24, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 sickbeard/tv.py
View
@@ -1497,11 +1497,11 @@ def _format_string(self, pattern, replace_map):
# do the replacements
for cur_replacement in sorted(replace_map.keys(), reverse=True):
- result_name = result_name.replace(cur_replacement, helpers.sanitizeFileName(replace_map[cur_replacement]))
- result_name = result_name.replace(cur_replacement.lower(), helpers.sanitizeFileName(replace_map[cur_replacement].lower()))
+ result_name = result_name.replace(cur_replacement, replace_map[cur_replacement])
+ result_name = result_name.replace(cur_replacement.lower(), replace_map[cur_replacement].lower())
+
+ return helpers.sanitizeFileName(result_name)
- return result_name
-
def _format_pattern(self, pattern=None, multi=None):
"""
Manipulates an episode naming pattern and then fills the template in

0 comments on commit 36e39df

Please sign in to comment.