JosefNemec / Playnite

Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.
https://playnite.link
MIT License
9.45k stars 504 forks source link

Add VNDB as Metadata Source #224

Closed ArtexJay closed 4 years ago

ArtexJay commented 7 years ago

Would it be possible to make VNDB a source for scraping metadata for some visual novel games? I think it would add a huge list of Visual Novel Games if not all of them, as well as offer info and boxart which other databases do not have for VN games.

ArtexJay commented 7 years ago

Found the api database for VNDB

ArtexJay commented 6 years ago

Hope this gets added soon, since this covers every single visual novel game ever released till now and in the future

githugt commented 6 years ago

I'll try working on this. I use the heck out of VNDB as well, so I can totally understand the allure of having it. :) Thaks ArtexJay for linking the the public APIs required.

JosefNemec commented 6 years ago

@githugt I would wait until extension support is added. I don't want to hard code other metadata providers, but have them extendable with plugins.

githugt commented 6 years ago

All right.

JosefNemec commented 6 years ago

You can follow #115 to see when it's ready.

githugt commented 6 years ago

Thanks @JosefNemec . Done. I'm far more used to bitbucket. :P

KuroThing commented 5 years ago

For those interested, I've forked and hacked in Vndb as a Metadata Source. This was done using the VndbSharp and ValueTuples (Because i'm lazy!) as additional libraries... It also required modifying the main PlayniteUI executable (Also modified Playnite.dll, to keep with uniformity of where the other metadata providers were).

It seems that i can't create my own release without hard forking from this library, so I can't provide the files even if i wanted to... So those of you who really want this feature, will need to download both the VndbSharp repo linked above (Master branch) and my fork's branch and compile both, and replace your install with your compiled version. This does mean that unless you (Or me) manually update the Playnite files, you'll be stuck on version 4.64

Until #417 is completed, I can't really make this a proper plugin... Which is sad. Hopefully @JosefNemec might find some interest in providing the capability of metadata only plugins soon now that i've done this. Personally, it makes Playnite that much better, being able to autofill information on Visual Novels.

As far as creating a pull request, I'm not bothered to eliminate the dependency on VndbSharp (Despite knowing full well how to utilise the Vndb API without it) and it doesn't provide a nugget package, along with the statements on this issue makes it seem like it's a waste of time.

JosefNemec commented 5 years ago

Support for custom metadata providers was added in Playnite 6. You should be able to create custom plugin for this now, without any addition support from Playnite required.

Mithnar commented 4 years ago

This was a journey ....

I kinda wanted it, so I implemented an extension for VNDB. https://github.com/Mithnar/PlayniteVndb

First time I touched c#, so it's probably not the cleanest way to do it - but it (mostly) does what it should. Not 100% done, but it works as a way to get the metadata via "edit game details"-dialog.

Working with the extension API was pretty smooth.

KuroThing commented 4 years ago

This was a journey ....

I kinda wanted it, so I implemented an extension for VNDB. https://github.com/Mithnar/PlayniteVndb

First time I touched c#, so it's probably not the cleanest way to do it - but it (mostly) does what it should. Not 100% done, but it works as a way to get the metadata via "edit game details"-dialog.

Working with the extension API was pretty smooth.

I totally didn't forget to come back and make a plugin, not at all <__<

(I totally intended on making one when Josef made the comment 19 days ago, but because the 6.x release was locked to patreon users, I didn't have access to 6.0, or the ability... And promptly forgot!)

Just a word of advice, @Mithnar by calling .Result on any method that ends with "Async" it will block the thread (and if it's executed on the UI Thread, the UI as well). Because there is no Async path, and you need the data available from the methods, there is no path to fix this without redesigning the entire plugin call stack (Async / Await is one of those all or nothing things) or risking the chance of the entire application crashing.

Mithnar commented 4 years ago

Thanks for the advice @KuroThing - I'm aware of the blocking issue in the current code, one reason why I didn't implement any bulk download yet (https://playnite.link/docs/api/Playnite.SDK.Plugins.MetadataRequestOptions.html).

The way the plugin is now, basicly just handles my usecase + a bit on top. I'll keep improving it, but help is always appreciated if you're still motivated to work on a playnite plugin :)

JosefNemec commented 4 years ago

Please don't forget to post it on our new forum so other people can easily access it. Thank you

darklinkpower commented 4 years ago

Thanks a lot! This extension was the main reason I was eagerly waiting for metadata plugins support and it was released very fast.

By the way, there's a typo in your Credits:

Credits [...] https://github.com/JosefNemec/Playnite For creatubg Playnite

For some reason it's not working for me, I get this when I select the game and it tries to download the metadata: imagen

It translates as: "Failed to download metadata: reference to object not set as an instance of the object". This is with the 1.0 - Release Candidate 2

Mithnar commented 4 years ago

There was an issue regarding a missing configuration file if you've never saved the plugin settings. I'll upload a fixed release very soon

Workaround:

For future issues with the Plugin, please open an issue here: https://github.com/Mithnar/PlayniteVndb

@JosefNemec I will create a post in the forum, when I release 1.0 and stuff like this doesn't happen.

darklinkpower commented 4 years ago

I tried the new release and it works great, I was surprised you can even pick screenshots to download. I'll be testing it and open an issue if anything comes up.

JosefNemec commented 4 years ago

Cool, if you don't mind I will close this issue then. Please continue additional discussion in extension's repository. Thank you