Skip to content

Commit

Permalink
fix(album-search): 🐛 searches with accented characters would remove c…
Browse files Browse the repository at this point in the history
…haracters

fixes #81
  • Loading branch information
djdembeck committed Feb 23, 2023
1 parent bb760be commit 0645c16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Contents/Code/search_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,10 @@ def normalize_name(self):
input_name = self.media.album if self.media.album else self.media.title
log.debug('Input Name: %s', input_name)

# Remove Diacritics
name = String.StripDiacritics(input_name)
# Remove brackets and text inside
name = re.sub(r'\[[^"]*\]', '', input_name)
name = re.sub(r'\[[^"]*\]', '', name)
# Remove unwanted characters
name = re.sub(r'[^\w\s]', '', name)
# Remove unwanted words
Expand Down

0 comments on commit 0645c16

Please sign in to comment.