251
Post New Requests Here / Re: IDEA - Create a text doc of an artists discography.
« Last post by 4wd on November 07, 2020, 03:21 AM »Thank you very, very much for taking the time to do this !-fred dred (November 07, 2020, 02:36 AM)
No problem, it was quite literally 20 minutes of playing around - working out the RegEx to remove everything I didn't want took the most time.
The MusicBrainz output is brilliant - but no dates means it's a pain to cross reference with my existing files.
You can get the dates, you just have to follow every album link but they do provide the info in JSON format without having to strip it out of the page.
For example, AC/DC's High Voltage:
XML
JSON
So it can be obtained, just grab the JSON and pull out the first date value, as an example:
Code: PowerShell [Select]
- $album = (Invoke-WebRequest -Uri "https://musicbrainz.org/ws/2/release-group/2b81e645-4586-4456-843a-9bc19a217470?inc=releases&fmt=json") | ConvertFrom-Json
- "$($album.releases[0].date) - $($album.title)"
The only problem being multiple release dates, eg. for that particular entry there are nine dates ... which one do you choose really?
Considering MusicBrainz provide album data in JSON, I'm kind of surprised that the artist page doesn't provide the same, (I mean including the album details, ie. combined artist+releases).