A current problem exists where the Kodi search function is not working in the beta of v18 Leia. Come and find out why this is happening and how to get working addons in Kodi 18 Leia.
You can currently get the Kodi 18 download for beta #2, and it is working great for the most part, but some users have noticed something peculiar. Some addon search functions are not working in Kodi 18.
Kodi Search Not Working – Why?
The issues stems from a change in the way that Kodi handles python scripts in the new version. In Kodi, search results are cached so that search history can be quickly retrieved in the future inside of the addon. Caching is a common function enabled on all Kodi addons.
Any addon using the old method for caching will find Kodi search not working in v18. Since most addons are either a fork of Exodus (which uses this method) or based on the Jen addon framework (which also uses this method), they will need to be updated in order for search to work again.
Can I fix Kodi search in v18 Myself?
In short, no. This python code change needs to be updated by each developer for each addon. The good thing is that once a developer updates their code, it only has to be done once and search will work indefinitely after that.
In theory, the new caching functionality will produce a performance improvement for Kodi. This will make it worth it in the end, but there’s a bit of a growing pains period while Kodi 18 is in beta.
How can developers update their Kodi search code in v18?
The fix for Kodi search broken in v18 is easy for developers at face value. However, the basic updates below will cause users to lose the ability to store previous searches. More work in the code is required to restore this functionality.
To fix Kodi search in v18, the following changes have to be made:
- In the addon’s movies.py file, the following code needs to be added alongside all other imports: import xbmc
- The whole def search_new code needs to be replaced with the code found here: https://pastebin.com/KWad9rMj
- In the addon’s tvshows.py file, the following code needs to be added alongside all other imports: import xbmc
- The whole def search_new code needs to be replaced with the code here: https://pastebin.com/rBUrunsZ
Which addons have working Kodi search in v18?
So far, we can confirm that the Magicality Kodi addon has been updated to work with Kodi 18 search functions.
Some developers may choose to wait for the official release of Kodi 18 before updating their addons. We will try to update this post with addons as they update, but if you see the problem you will know what the issue is.