Kodi Community Forum
Req Improve Search - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
+--- Thread: Req Improve Search (/showthread.php?tid=371449)



Improve Search - Beedjees - 2023-01-20

Actualy when I search a movie or an actor, the search feature is accent sensitive. Is it possible to change this to make accent insensitive ?

Eg : when I search "equipe" the result would include "L'incroyable équipe" and "L'Equipée sauvage"


RE: Improve Search - izprtxqkft - 2023-01-20

head start for devs
if talking about doing this in kodi itself it could use something like https://stackoverflow.com/questions/58460010/convert-non-ascii-characters-to-english-counterpart-c

but i think it would be better if it was in the global search addon so a python would be https://stackoverflow.com/questions/42205633/replace-language-specific-characters-in-python-with-english-letters#42206067
 
Quote:Try unidecode:

# coding=utf-8
from unidecode import unidecode

city = "České Budějovice"
print(unidecode(city))

Prints Ceske Budejovice as desired (assuming your post has a typo).

Note: if you're using Python 2.x, you'll need to decode the string before passing it to unidecode, e.g. unidecode(city.decode('utf-8'))



RE: Improve Search - Klojum - 2023-01-20

(2023-01-20, 22:30)jepsizofye Wrote: Note: if you're using Python 2.x,

Python 2 is really not an option since Kodi 19.


RE: Improve Search - izprtxqkft - 2023-01-20

(2023-01-20, 22:51)Klojum Wrote:
(2023-01-20, 22:30)jepsizofye Wrote: Note: if you're using Python 2.x,

Python 2 is really not an option since Kodi 19.

oh im aware thats just a direct quote from the stack link i posted. thought it would be helpful to give the devs something to start from if they choose to work on this.