[WS] VGMdb (extended)

Hi guys,

I have written a Web Source Script for VGMdb. VGMdb focuses on video game music, but in my experience is also the best source for anime related music.

The script started as a fork of Romano's great script found over in this topic, but with a focus on multi-language support and additional fields. As the discussion in the other topic is focused on Romano's VGMdb script, it seemed more appropriate to create a new topic.

Disclosure: I had and still have pretty much no idea what I'm doing, and the script is probably an unnecessarily convoluted mess, so I'd be very grateful for any tips and feedback. I've tested the script with a few hundred of my own tracks and found no errors, but since I don't know the exact structure of VGMdb's records, I suspect there could be a lot of bugs, especially since I don't have any mixed media, very old or unusual albums to test the script with. Also this script was written and tested on linux running Mp3tag through wine... but I don't see why it shouldn't work on Windows.

Ignore the squares in the screenshot... I was too lazy to configure the wine prefix correctly.

The idea behind this script is to offer a lot of information from VGMdb and let the user map this information to the common tag fields available in Mp3tag. You can use it by entering the full VGMdb album url. The script currently supports the following fields:

  • VGMDB_ALBUM_TITLE_JA
  • VGMDB_ALBUM_TITLE_JA_LATN
  • VGMDB_ALBUM_TITLE_EN
  • VGMDB_CATALOG_NUMBER
  • VGMDB_BARCODE
  • VGMDB_RELEASE_DATE
  • VGMDB_RELEASE_DATE_YEAR
  • VGMDB_MEDIA_FORMAT
  • VGMDB_CLASSIFICATION
  • VGMDB_LABEL
  • VGMDB_MANUFACTURER
  • VGMDB_DISTRIBUTOR
  • VGMDB_PUBLISHER
  • VGMDB_PHONOGRAPHIC_COPYRIGHT
  • VGMDB_CATEGORY
  • VGMDB_PRODUCTS_REPRESENTED
  • VGMDB_NOTES
  • VGMDB_URL
  • VGMDB_MAIN_CREDITS_COMPOSER
  • VGMDB_MAIN_CREDITS_WRITER
  • VGMDB_MAIN_CREDITS_ARRANGER
  • VGMDB_MAIN_CREDITS_PERFORMER
  • VGMDB_MAIN_CREDITS_VOCALS
  • VGMDB_MAIN_CREDITS_LYRICIST
  • VGMDB_MAIN_CREDITS_PROGRAMMER
  • VGMDB_MAIN_CREDITS_CONDUCTOR
  • VGMDB_MAIN_CREDITS_SOUND
  • VGMDB_MAIN_CREDITS_PRODUCER
  • VGMDB_ALL_CREDITS
  • VGMDB_DISC_TITLE
  • VGMDB_DISC_CLASSIFICATION
  • VGMDB_DISC_NUMBER
  • VGMDB_TRACK_NUMBER_ENG
  • VGMDB_TRACK_NUMBER_ROM
  • VGMDB_TRACK_NUMBER_JAP
  • VGMDB_TRACK_TITLE_ENG
  • VGMDB_TRACK_TITLE_ROM
  • VGMDB_TRACK_TITLE_JAP
  • VGMDB_TRACK_DURATION_ENG
  • VGMDB_TRACK_DURATION_ROM
  • VGMDB_TRACK_DURATION_JAP

...as well as the full size cover art.

I have provided a default mapping starting from line 1832, but feel free to adapt this to your personal needs. The default mapping favours Romaji over English over Japanese.

Limitations: This script only scrapes the first five available tracklists and discs. This means that it will not work with albums with more than five discs and will miss English, Japanese and Romaji tracklists if they are not in the first five playlists. This is not really a technical limitation and could be extended in the future. For now, I have implemented these limits for the sake of testing and maintainability.

Best regards
GiFuJo

VGMdb_by_URL.src (68.5 KB)

Changelog:
Version 1.0.1-20230127: Fixed wrong delimiter in "VGMDB_ALL_CREDITS"
Version 1.0.0-20230127: Initial release

6 Likes

Seems like you can only edit your posts for a few days (or I'm missing something)...

So here is a new version:

Version 1.0.2-20230130: Changed default mapping for "GENRE" to favour "VGMDB_DISC_CLASSIFICATION" over "VGMDB_CLASSIFICATION"

VGMdb_by_URL.src (69.3 KB)

1 Like

Version 1.0.3-20230201: Fixed indented credits in "VGMDB_ALL_CREDITS"
Version 1.0.4-20230201: Fixed pipe characters ("|") in album titles
Version 1.1.0-20230202: Replaced "VGMDB_PRODUCTS_REPRESENTED" with "VGMDB_PRODUCTS_REPRESENTED_EN", "VGMDB_PRODUCTS_REPRESENTED_JA" and "VGMDB_PRODUCTS_REPRESENTED_JA_LATN"

Mapping now begins in line 1875.

VGMdb_by_URL.src (70.7 KB)

1 Like

Version 1.1.1-20230204:

  • Fixed annotations in "VGMDB_MEDIA_FORMAT" (e. g. "Cactus Data Shield")
  • Fixed error on missing Barcode
  • Fixed "VGMDB_PRODUCTS_REPRESENTED_*" not being picked up when product is the same for all languages and has no special entry

Version 1.1.2-20230205:

  • Fixed regressions with VGMDB_PRODUCTS_REPRESENTED_*" and "VGMDB_BARCODE"
  • Fixed handling of child menus in "VGMDB_CATALOG_NUMBER"

VGMdb_by_URL.src (71.4 KB)

2 Likes

Version 1.1.3-20230212:

  • Fixed handling of multiple "VGMDB_PRODUCTS_REPRESENTED_*"
  • Mapping now begins at line 1924

VGMdb_by_URL.src (72.5 KB)

1 Like

After tagging around 2,000 albums I haven't found any issues with the script, so I took the opportunity to clean the script up a bit:

Version 2.0.0-20230309

  • Maintenance and code cleanup

VGMdb_by_URL.src (72.5 KB)

Mapping now begins at line 1923.

2 Likes

Is there any way to tag Japanese tracklists?

How to match the cue_track_artist to the artist column, so that the artist column would too long


By default the script reads JAP, ROM and ENG tracklists. Japanese track titles are written to the custom field "VGMDB_TRACK_TITLE_JAP" and can be mapped to any field you like. To change the default track language to Japanese just change lines 1985 till 1996 in the script to:

OutputTo "TRACKS"
IfOutput "VGMDB_TRACK_TITLE_JAP"
  SayOutput "VGMDB_TRACK_TITLE_JAP"
Else
  IfOutput "VGMDB_TRACK_TITLE_ROM"
    SayOutput "VGMDB_TRACK_TITLE_ROM"
  Else
    IfOutput "VGMDB_TRACK_TITLE_ENG"
      SayOutput "VGMDB_TRACK_TITLE_ENG"
    EndIf
  EndIf
EndIf
2 Likes

VGMdb has no track specific credits. I suspect that your "CUE_TRACK0#_ARTIST" fields are from another tagging source. The way they are presented in the screenshot, I can't think of any automation method inside Mp3tag. So you are probably stuck manually overwriting the ARITST tag with your cue tags.

1 Like

Hey, I'm having a problem with version 2 of the script. If I use the URL "Rhythm Tengoku Complete Music Collection | QWCT-10023 - VGMdb" (Rhythm Tengoku Complete Music Collection) I get the following error:
ERROR(L162/moveline): line does not exist.
I've even tried v1.1.3, which throws up the error:
ERROR(L153/moveline): line does not exist.
I'm pretty new to MP3Tag and I've never used a custom tag source, so apologies if I'm missing something really obvious, but any assistance at all for this would be much appreciated.

Hey there!

I just checked the album you linked to and can't reproduce the error. I tried with Mp3tag v3.23 and script version 2 on Windows and Linux via Wine.

From the error you posted I would guess that maybe your request/connection to VGMDB timed out, because line 162 in the script refers to an item that is mandatory in the VGMDB so there is no way it can't find the next line. And since you didn't get an error for earlier lines in the script maybe the source code of the requested page didn't fully download.

I would suggest checking if you can reach VGMDB fine on your web browser and maybe try again.

Hello and hope all is well.

I was trying to figure the settings on my own prior to replying in regards to my situation. For the most part, I've never had an issue with the script in general that I can remember if I'm being quite honest. The issue I am particularly running into is that I cannot change certain settings for the tracklist language at all. I followed the instructions as of your recent replies to another user, but this particular thing sounds beyond my understanding. So for example, when try to tag Nintendo DS Pokémon Black・White Super Music Collection using MP3Tag (latest version), I get the listing, but it only ever gives me the Romaji variant, but there is an "English (iTunes)" toggle as well that I am trying to access as my priority tracklist. Is there a setting I am overlooking or possibly a special one that needs to be added to the file in order for it to switch over from Romaji to English (iTunes) tracklist? I have mine set up like this:

OutputTo "TRACKS"
IfOutput "VGMDB_TRACK_TITLE_ENG"
SayOutput "VGMDB_TRACK_TITLE_ENG"
Else
IfOutput "VGMDB_TRACK_TITLE_ROM"
SayOutput "VGMDB_TRACK_TITLE_ROM"
Else
IfOutput "VGMDB_TRACK_TITLE_JAP"
SayOutput "VGMDB_TRACK_TITLE_JAP"
EndIf
EndIf
EndIf

So I don't know if I'm the dope that messed up somewhere or if it's something completely different.

On a different note, I know you mentioned you limited the tracklists to 5 discs, but would it be possible to add extra tracklists by copying and pasting previous lines of code to add those extra discs beyond the set 5 you have currently applied? I would prefer not the break the script if it can be helped, but there is an upcoming album, and some very specific ones I've come across, that exceed 5 discs, so I wasn't sure if that was the way I would add more discs to the script and it wouldn't change how the script works.

Sorry, for the late reply!

Regarding the "English (iTunes)" tracklist:

The script looks for tracklists that are exactly named "English", "Romaji" or "Japanese". So the tracklist "English (iTunes)" would be skipped by the script because "English (iTunes)" is not equal to "English". I've checked a few hundred of my cached vgmdb entries and there are several tracklists with unique names not picked up by the script. Accounting for all those lists would make the script extremely slow and harder to maintain. What you can do however is to create a copy of the script and replace all occurences of

If "English<"

with

If "English (iTunes)<"

and change the script name to something like "VGMdb_by_URL-itunesmod". This way the "English (iTunes)" tracklist would be picked up and written to the ENG track fields.

Regarding the disc and tracklist limit:

Yes, you can copy and paste most of the code. You can download version 2.1 of the script below. This contains support for up to 8 tracklists and up to 8 discs in each tracklist. Because those cases are rare I didn't test a lot of entries, but it seems to be working.

Version 2.1.0-20240125

  • Added support for up to 8 tracklists and up to 8 discs in each tracklist
  • Mapping now begins at line 2946

VGMdb_by_URL.src (105.9 KB)

Metadata Title area isn't working

I cannot reproduce this error. Could you provide the album id?

https://vgmdb.net/album/135359 but I did tag the titles using foobar2000 like a week later so you're too late to help on my end of things maybe it'll help others

I cannot find any error. I can easily get all expected metadata from the url...

First of all, fantastic script. Thank you. I've noticed on some rare albums e.g (https://vgmdb.net/album/17990) pulling the VGMDB tags will give an error in the tag VGMDB_ALL_CREDITS. I'm sure it's due to vgmdb's lack of formatting consistency, just curious if there's any way to work around it. Not a dealbreaker, of course!

Also in some cases with albums that have 2 discs, only the first discs information is pulled. (https://vgmdb.net/album/16205)

Also, just in case I haven't been enough of a pain, I have a similar issue with VGMDB_PRODUCTS_REPRESENTED_EN tags, and most likely the JA/LA ones as well, on (https://vgmdb.net/album/20429) I hope these can be managed as this is one of the best things to happen to my VGM collection in a long time.