Mercurial > hg > camir-aes2014
annotate core/magnatagatune/mb_retrieve_artist_id_from_isrc.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
rev | line source |
---|---|
wolffd@0 | 1 function [artist_mbid, out] = mb_retrieve_artist_id_from_isrc(isrc) |
wolffd@0 | 2 |
wolffd@0 | 3 % song info API |
wolffd@0 | 4 url = sprintf('http://www.musicbrainz.org/ws/2/isrc/%s',urlencode(isrc)); |
wolffd@0 | 5 [status] = wget(url,'-t 10 -U firefox -O tmp.xml'); |
wolffd@0 | 6 |
wolffd@0 | 7 try |
wolffd@0 | 8 out = xml2struct('tmp.xml'); |
wolffd@0 | 9 % album name for verification |
wolffd@0 | 10 albumname = out.metadata.isrc.recording_dash_list.recording.title |
wolffd@0 | 11 artist_mbid = out.metadata.isrc.recording_dash_list.recording.Attributes.id; |
wolffd@0 | 12 catch |
wolffd@0 | 13 artist_mbid = []; |
wolffd@0 | 14 out = []; |
wolffd@0 | 15 end |