Skip to content

Commit

Permalink
Fix special caracters during search
Browse files Browse the repository at this point in the history
  • Loading branch information
detobel36 committed Mar 26, 2023
1 parent de147f8 commit edcc051
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugin.video.vstream/resources/lib/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,13 @@ def _quickSearchForPlugin(self, plugin, searchInfo):


def _removeNonLetterCaracter(self, word):
return "".join(re.findall(r'[a-zA-Z0-9 ]*', word, flags=re.I)).strip()
result = re.sub(r'[^a-zA-Z0-9]', ' ', word, flags=re.I)
result = re.sub(r'éèêë', 'e', result, flags=re.I)
result = re.sub(r'à', 'a', result, flags=re.I)
result = re.sub(r'ô', 'o', result, flags=re.I)
result = re.sub(r'ù', 'u', result, flags=re.I)
result = re.sub(r'œ', 'oe', result, flags=re.I)
return result


def _getSearchInfo(self):
Expand Down

0 comments on commit edcc051

Please sign in to comment.