I was rather thinking you'd name the file with the artist and album name, so it would only apply if searching for that album...
Doing the search would probably be easiest, yes, but it does feel a bit of a waste to be throwing away information that is already known.
Alex
I hadn't thought of saving as multiple files because then you'd need some way to clean them up, and I have no idea how to do that.
Anyway, starting with the musicbrainz.boo as a template, things were going along great until I hit a wall.
fanartURL = "http://api.fanart.tv/webservice/album/${key}/${mbid}/json/albumcover/1/2/"
//System.IO.File.WriteAllText("fanart1.log", fanartURL)
picDoc = GetPage(fanartURL)
System.IO.File.WriteAllText("fanart2.log", picDoc)
picResult = json.DeserializeObject(picDoc) as Dictionary[of string, object]
The mbid is correct, and when I write out the results of the picDoc JSON I get this:
{"AC/DC":{"mbid_id":"66c662b6-6e2f-4930-8610-912e24c63ed1","albums":{"d3bc1a64-7561-3787-b680-0003aa50f8f1":{"albumcover":[{"id":"3671","url":"http://assets.fanart.tv/fanart/music/66c662b6-6e2f-4930-8610-912e24c63ed1/albumcover/back-in-black-4de2c08a61a5b.jpg","likes":"1"},{"id":"67760","url":"http://assets.fanart.tv/fanart/music/66c662b6-6e2f-4930-8610-912e24c63ed1/albumcover/back-in-black-50fb8236b8530.jpg","likes":"1"}]}}}}
However, the problem is that when I try and to reference anything in picResult, the script just stops. All I want/need is the url values so I set up a "for image as Dictionary[of string, object] in picResult["url"]", but it never went inside. I tried different members of picResult, all with no dice. I tried to just write picResult["mbid_id"] to a file, but the line doesn't seem to execute. I don't understand why I can reference the mbidResults in exactly the same way with no problem, but it just chokes on picResult. Any ideas? What am I missing?