I'm currently playing with python-musicbrainz2, it's nice, but I found this strange problem.
I'm trying to get some info for differents release, using Artist Name and Album Title.
I face a case that doesn't behave correctly. I retrieve the release object fine, scored 100%, artist name is OK, album title is OK, and the id of the release is OK too. What is stange is that the Asin is None, but on the musicbrainz web server page the Asin exists.
Here is an example that illustrate it :
#! /usr/bin/python
# -*- coding: utf8 -*-
from musicbrainz2.webservice import Query, ReleaseFilter, Release, WebServiceError
q = Query()
releaseResults = None
try:
test_title = u"Nattf\xf6dd"
test_artist = u"Finntroll"
f = ReleaseFilter(title=test_title, artistName=test_artist, releaseTypes=(Release.TYPE_ALBUM, Release.TYPE_OFFICIAL), limit=5)
releaseResults = q.getReleases(f)
except WebServiceError, wse:
print "[ERROR]", wse
if releaseResults is not None and len(releaseResults) == 0:
print "[INFO] No result from Music Brainz, sorry."
print "[DEBUG] Number of results:", len(releaseResults)
for result in releaseResults:
my_release = result.release
print "[DEBUG] Artist:", my_release.artist.name
print "[DEBUG] Title:", my_release.title
print "[DEBUG] Score:", result.score
print "[DEBUG] ASIN:", my_release.asin
print "[DEBUG] ID:", my_release.id
print "[DEBUG] Verif URL:", my_release.id + ".html"
And here is the output :
[DEBUG] Number of results: 1
[DEBUG] Artist: Finntroll
[DEBUG] Title: Nattfödd
[DEBUG] Score: 100
[DEBUG] ASIN: None
[DEBUG] ID: http://musicbrainz.org/release/dce2a43e-d689-4d87-aab7-9c2c9e24ed50
[DEBUG] Verif URL: http://musicbrainz.org/release/dce2a43e-d689-4d87-aab7-9c2c9e24ed50.html
As you can see, ASIN is None.
But if you go on the link given at the last output line, you can see that the ASIN exists (it's B000AAVFKO).
So what's the problem here ?
lib versions :
ii libmusicbrainz4-dev 2.1.4-1 Second generation incarnation of the CD Inde
ii libmusicbrainz4c2a 2.1.4-1 Second generation incarnation of the CD Inde
ii python-musicbrainz2 0.4.1-1 An interface to the MusicBrainz XML web serv
Anyway, many thanks for the good work !