Hi!
I am using the TMDb Helper plugin in Kodi that implements the Discover API for the ‘Discover’ Hub in the Arctic Fuse skin.
I’ve noticed that the Discover API continually returns significantly lesser results than the Search API. I am not using any filters so I wasn’t sure what was leading to the discrepancy. Also not sure if regional settings are affecting this.
Here’s an example: If I search for ‘SpiderMan’, the Search API returns 80 movie results and Discover only gives me 15 (skips the MCU movies and only shows the Raimi and some other animated ones).
Is it because Search implements a fuzzy matching, hence hyphenated or any special characters are also taken into consideration when returning results? Like Spider-Man, Spider Man, Spiderman, etc. will show you all the movies regardless of the hyphen or capitalization?
To prove this theory, I tried searching for ‘SpiderMan No Way Home’ using Discover and it gave me ‘No Results’. Although I have typed out the entire title of the movie, since I missed the hyphen (-) between ‘Spider’ and ‘Man’, the Discover API won’t return the relevant results.
Will be much obliged if someone could help me out on this.
Thanks in advance!
¿No encuentras una película o serie? Inicia sesión para crearla:
¿Quieres puntuar o añadir este elemento a una lista?
¿No eres miembro?
Contestado por ticao2 🇧🇷 pt-BR
el 4 de agosto de 2024 a las 11:47
These are two different API Requests, with different features searching in different fields.
Search
Basically searches in the Title field (Original, Translated or Alternative Names).
It has a few other filters.
https://developer.themoviedb.org/reference/search-movie
Discover
Does not search by Title.
It searches by numerous other filters.
https://developer.themoviedb.org/reference/discover-movie
There is an undocumented filter in Discover that searches by text.
I don't know if this PlugIn/Addon is using it.
Without knowing which API Request each of the Add-on's filters is creating it is impossible to give any help.
It is best to ask in the Add-on forum.
https://kodi.wiki/view/Add-on:TheMovieDb_Helper
https://forum.kodi.tv/showthread.php?tid=345847
Contestado por OfficerKD6-3.7
el 4 de agosto de 2024 a las 12:01
Thanks for the reply!
Yes the add-on does use
with_text_query
as the parameter to search for movies and TV shows. The other filters (Year, Cast, Ratings, etc.) can be used on top of this to narrow your results.I do understand that those two APIs function differently, but even with all other filters switched off (only passing the movie title string to the with_text_query) I would assume the Discover API to return almost the same number of results as the Search API? I’m not sure what other filtering is going on behind the scenes.
This is what Jurial (the developer of the addon) had to say about this: “ Yes that's the parameter. This is server side code so I have no idea how it works other than it does some text filtering for the discover results based on the keyword passed. I assume it checks titles and plots and maybe some other fields.
My best guess is that search queries do closer to what you're thinking and so you get more results. I guess also the discover filter is very rudimentary and doesn't go very deep for performance reasons.
These are very much guesses. Only way to know is to see the server code which obviously is not available.”
Hence I thought it’d be best to ask the TMDb support to get more clarity on this issue.
Thanks!
Contestado por ticao2 🇧🇷 pt-BR
el 4 de agosto de 2024 a las 12:15
This feature for Discover, "with_text_query", is a work in progress.
That's why it hasn't been published in DOCs yet.
There is no documentation.
And yes, it still has several limitations.
There are plans to add this feature.
It's already on Trello's To-Do list.
There is no implementation deadline.
If you want you can vote. More votes, faster. :-)
See here:
https://trello.com/c/Bf1T0IUL/25-add-a-title-text-search-to-discover
Contestado por OfficerKD6-3.7
el 4 de agosto de 2024 a las 12:18
THANK YOU!! You’re the best! I will definitely vote for it asap!