mProjectsCode / obsidian-media-db-plugin

A plugin that can query multiple APIs for movies, series, anime, games, music and wiki articles, and import them into your vault.
GNU General Public License v3.0
243 stars 28 forks source link

Input validator too short #139

Open christenbc opened 5 months ago

christenbc commented 5 months ago

If I want to search "Up" movie, the validator prevents me to query for it. 2 character should also be allowed.

primarist commented 5 months ago

^^ Bump, I support this. Several single character movies as well, though I understand how that is problematic from a search perspective. Searching for them using IMDB ID doesn't seem to return anything either.

mProjectsCode commented 5 months ago

I think i implemented that because certain APIs will error out when the search is too short

christenbc commented 5 months ago

Is there a possibility they updated the API? It's a weird limitation to cap the char limit as there are movies named after a single character.

ltctceplrm commented 2 weeks ago

I was curious so I checked and it is omdbAPI that gives errors when searching for movies with one or two letter names like M or even just Up.

{
    "Response": "False",
    "Error": "Too many results."
}

Unfortunately omdb currently does not allow searching for a query + year, only for title + year but then it only shows the first matching result and wouldn't list all movies with that title in that year. If it was possible to use the query search with the year then you could limit the amount of results and list list all movies with M in it in the year 1931 for example.

There's an open issue for this on the omdb github so if it ever gets added then this could be fixed.

Searching for them using IMDB ID doesn't seem to return anything either.

This does work though if you use search by ID rather than regular search, which ID did you try?