PlayniteExtensionsCollection
PlayniteExtensionsCollection copied to clipboard
[VNDB Nexus] Use VNDB link for metadata
Extension name
VNDB Nexus
Feature Description
I added all of my visual novels with the VNDB link attached to each game, it would be nice if there was an option for the metadata part of the extension to search VNDB using the link attached to each game instead of the default behavior being the name. I noticed it struggles to find a lot of them when pulling for metadata in batches. I imported about 600 visual novels and it found maybe 120.
Screenshots
No response
Trying to get visual studio setup to test it but I think adding these lines to VNDBNexusMetadataProvider.cs in the SearchVisualNovel method should work.
private void SearchVisualNovel(CancellationToken cancellationToken)
{
if (_requestOptions.IsBackgroundDownload)
{
var gameName = _requestOptions.GameData.Name;
var gameLinks = _requestOptions.GameData.Links;
if (gameLinks != null && gameLinks.Any(link => link.Name.Equals("VNDB", StringComparison.OrdinalIgnoreCase)))
{
var vndbLink = gameLinks.FirstOrDefault(link => link.Name.Equals("VNDB", StringComparison.OrdinalIgnoreCase));
var vnID = Regex.Match(vndbLink.Url, @"v\d+");
gameName = vnID.Value;
}
var searchResults = Task.Run(async () => await GetVnSearchResultsAsync(gameName, cancellationToken))
.GetAwaiter()
.GetResult();
var normalizedGameName = gameName.Satinize();
I imported about 600 visual novels and it found maybe 120.
There was a bug that prevented correctly matching games during background metadata import that has been fixed. Additionally, matching also now checks for aliases and alternative titles. Please try downloading metadata after verifying that you are using the latest version, for a few titles that failed to find a match again to see if the issue remains.