Kodi Community Forum

Full Version: Improve Search
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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"
head start for devs
if talking about doing this in kodi itself it could use something like https://stackoverflow.com/questions/5846...nterpart-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/4220...s#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'))
(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.
(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.