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
254 stars 31 forks source link

Added support for Moby Games API #131

Closed ltctceplrm closed 9 months ago

ltctceplrm commented 10 months ago

It needs authentication through an API key but you get those by making a free account.

This PR solves #76 and its duplicate #118. Potentially also solves #20 if Moby Games is satisfactory for the OP.

ltctceplrm commented 10 months ago

I think it would be beneficial if it was possible to disable certain APIs from media types, for instance if you don't want to make a Moby Games or Omdb API key but you want to use the Steam API to add games then currently it would give an authentication error for either one of them and error out. (Unless you choose to only search with Steam API rather than the general Game search of course, but imagine you have a Moby Games API key and want to search on Steam and Moby Games simultaneously then currently you wouldn't be able to do so)

Do you think an option to disable certain APIs would be feasible and useful?

ltctceplrm commented 9 months ago

Here's what it could look like in the settings:

Currently I've only added a toggle for media types where there are multiple APIs you can choose from.

mProjectsCode commented 9 months ago

Not a bad idea, though the different media types should be separated by sub headings imo.

mProjectsCode commented 9 months ago

I think it would be best if you made a separate PR for the API media type settings.

ltctceplrm commented 9 months ago

Good point about separating it with sub headings per media type instead of per API, it would be clearer like that.

I haven't progressed far enough to make it into a PR yet though, I've added the settings but they don't do anything yet until I figure out the best way to have MediaDbSearchModal only select the ones that are toggled. I'm not very good proficient with Typescript so I'm currently stuck on that part