Skip to content

Commit

Permalink
Normalize title before updating EXIF #17 (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmathai committed Jan 23, 2017
1 parent ce98e89 commit ed1dbc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion elodie/tools/add_original_name.py
Expand Up @@ -65,8 +65,9 @@ def parse_original_name_from_media(metadata):

trimmed_base_name = re.sub(date_regex, '', base_name)
if title:
normalized_title = re.sub(r'\W+', '-', title.lower())
trimmed_base_name = trimmed_base_name.replace(
'-{}'.format(title),
'-{}'.format(normalized_title),
''
)

Expand Down

0 comments on commit ed1dbc6

Please sign in to comment.