Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Bulk Metadata download #7

Open
Mithnar opened this issue Apr 19, 2020 · 6 comments
Open

Implement Bulk Metadata download #7

Mithnar opened this issue Apr 19, 2020 · 6 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Mithnar
Copy link
Owner

Mithnar commented Apr 19, 2020

Playnite has the ability to download Metadata for all games in the library.

The Plugin should support this.

The issues to solve:

  • The VNDB API has rate limits for the usage, those need to be handled

  • To avoid running into the rate limits, there'll need to be a strategy to avoid doing unnecessary calls against the API, or the bulk import will take too long for bigger libraries)

@Mithnar Mithnar added enhancement New feature or request help wanted Extra attention is needed labels Apr 19, 2020
@Snap47
Copy link

Snap47 commented Jun 27, 2020

Hey there, I just came across a browser extension for VNDB which also had to deal with the rate limits.
https://github.com/marcussacana/VNDB-Extender-2020
Perhaps you could glimpse in there for a solution?

@darklinkpower
Copy link
Contributor

@Snap47 it seems they parse the page instead of using the API like PlayniteVndb does, so the extension would need a heavy rework.
https://github.com/marcussacana/VNDB-Extender-2020/blob/master/scripts/vnAssetsController.js#L64

Issues a download request for the page for the vn with the given ID. Loading the page is better than using the API, because the data usage for just the HTML is minimal and there is no request limit for this method."

@EazyCheeze1978
Copy link

Hello! It's been a while since the last update - any progress on this issue? Am experiencing the efficiency loss associated with having to edit metadata for each of my 50+ visual novels individually; have put that on hold for the time being to keep my sanity :)

Looking forward to some positive progress! Take care :)

@darklinkpower
Copy link
Contributor

A possible rate limiter for this when someone looks into this https://github.com/David-Desmaisons/RateLimiter

@Mithnar Mithnar self-assigned this Aug 8, 2022
@Mithnar Mithnar removed the help wanted Extra attention is needed label Aug 8, 2022
@Mithnar Mithnar added this to the 2.3 milestone Aug 21, 2022
@Nikey646
Copy link

VNDB has great rate limits. You would need to issue effectively 3 commands a second before you even hit the rate limit, or "1 second of SQL time per minute" which is incredibly variable, because it'll change based off of server load.

You can definitely merge some requests, EG: When requesting data by id you can grab up to 25 visual novels in 1 request (Might hit that SQL time limit that way, so probably go for 3-5 per request instead). Definitely for the release data, grabbing in bulk would be the way to go.

@Mithnar
Copy link
Owner Author

Mithnar commented Aug 23, 2022

Hitting 200 Requests in 10 minutes is incredibly easy, when you have a big library in playnite.

Requesting multiple games is not easy in the playnite context:

  • I do get a single game object, and have to return the metadata for that game.
  • I have no control over the order of those games
  • I don't know if the game will provide the id, or if that game even is on VNDB

So a import with a game library of 400 games will take at least 20 Minutes, when none of those games will have a match on VNDB, longer if there are matches (and I have to grab the Publisher/Developer data aswell)

A Library of 1200 Games would take at least an hour.

I'm currently building a solution by caching relevant data, but that will still take some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants