the CAA is out to get me. looking at the stats page, the red line stopped being a factor when i went to bed. as soon as I woke up, it was back. silly servers plotting against me…
v6lur joined the channel
CallerNo6 joined the channel
kepstin suspects it has to do more with the timezones that people who use archive.org servers live in than with you specifically :)
well, yeah. but I can think I’m special for a minute, right? heh.
JesseW joined the channel
xplt joined the channel
reosarevok_ joined the channel
simukis_ joined the channel
reosarevok joined the channel
reosarevok_ joined the channel
spinza joined the channel
zas_ joined the channel
misterswag joined the channel
nikki__ joined the channel
nikki__ has left the channel
spinza joined the channel
spinza_ joined the channel
gioele joined the channel
mat_ joined the channel
spinza joined the channel
reosarevok_ joined the channel
SultS joined the channel
reosarevok__ joined the channel
JesseW joined the channel
zas_ joined the channel
spinza joined the channel
MBach joined the channel
MBach
hi
JesseW
MBach: hello. did you have a question?
MBach
true
JesseW
?
MBach
what is the best way to use the musicbrainz's webservice
in order to get all cover art
from a list like "artist -> releases"
JesseW
all the cover art for a particular album, or a particular artist, or?
MBach
to mimize the number of calls to the webservice, from a particular artist
and let's say, 5 albums on 10
kepstin
do you want just the front covers or all images?
MBach
(i am making an audio player by the way))
kepstin
do you want all versions of releases, or just a representative cover?
MBach: ok, in that case you'd use a release group browse request by artist mbid to get the release group mbids, then get the cover art image by release group mbid
the release group browse request is paginated, and can get up to (I think) 50 or 100 release groups per request
if you have a list of specific releases that you want cover art for, it's a bit more tricky
MBach
hmm
that's what i thought
kepstin
but in that case, you should already have release or release group mbids, and no queries are needed
so not actually more tricky after all :)
MBach
it seems not possible to get all with one request
kepstin
(if you don't already have mbids, but are looking up e.g. by name, then you're gonna have trouble)
MBach
that's right :D
kepstin
in that case, you'd be doing a search request for each pair of (artist,release group) to attempt to get an mbid, then using that mbid to get cover art.
ideally, you should store the mbid for things once you've done the lookup once so that you don't have to do it again... we have standard metadata tags to store this info in files, of course.
MBach
i read in the wiki that I shouldn't not do more than 1 call per second
kepstin
yes, 1 call per second per ip address is enforced by the rate limiter on the api
(it's actually 10 calls per 11 seconds, but staying at the 1/1 rate will avoid issues completely)
er, 11 calls per 10 seconds?
whatever. 1/1 is safe :)
most of the people like me who are avid musicbrainz users will have files where the metadata tags were saved by musicbrainz picard, meaning that the MBID tags are in the file. In this case, you can get coverart without needing to do any api requests at all.
so you'll want to make fairly heavy use of caching - e.g. look up the mbid once when adding an album and save the cover image locally, so you don't have to re-query all the time.
MBach
yep, I want to create a small plugin which grabs missing pictures
kepstin
you're writing your own player, and running foobar2000 in the mean time? :)
MBach
yep, because mine isn't finished =)
and foobar rocks
kepstin
yours looks more finished than mine ;)
hmm.
kepstin is kind of curious how well the search would work for the stuff you have - our coverage of romanized/transliterated versions of japanese releasese is a bit iffy
note that you have to do some escaping of the artist and release fields there, to fit the lucene search syntax. Just a few special characters to escape, I think.
the search will almost always give you back multiple responses, and you get a score with each one; based on the score and maybe some local comparisons, you can probably decide if there's a good enough match to use for cover art.
MBach
yep
sometimes using google nice too ;)
just type in what you want
and you have the right cover !
kepstin
yeah, but that's not super useful to programattically find cover art :)