Changeset 4 in flacrip for trunk/MusicBrainz.pm
- Timestamp:
- 07/26/12 21:33:59 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MusicBrainz.pm
r3 r4 47 47 my $release_count = $xpath->findvalue('count(//release)'); 48 48 my ($release) = $xpath->findnodes('//release[1]'); 49 $info{RELEASE_MBID} = $xpath->findvalue('@id', $release) ;50 $info{ALBUM} = $xpath->findvalue('title', $release) ;51 $info{ARTIST} = $xpath->findvalue('artist-credit/name-credit/artist/name', $release) ;49 $info{RELEASE_MBID} = $xpath->findvalue('@id', $release)->value; 50 $info{ALBUM} = $xpath->findvalue('title', $release)->value; 51 $info{ARTIST} = $xpath->findvalue('artist-credit/name-credit/artist/name', $release)->value; 52 52 53 53 # TODO: get release date … … 58 58 my $prefix = sprintf('TRACK%02d', $tracknum); 59 59 #$info{"$prefix.MB_TRACKID"} = $xpath->findvalue('@id', $track_node); 60 my $recording_mbid = $info{"$prefix.RECORDING_MBID"} = $xpath->findvalue('recording/@id', $track_node) ;61 $info{"$prefix.TITLE"} = $xpath->findvalue('recording/title', $track_node) ;62 $info{"$prefix.ARTIST"} = $xpath->findvalue('recording/artist-credit/name-credit/artist/name', $track_node) || $info{ARTIST};60 my $recording_mbid = $info{"$prefix.RECORDING_MBID"} = $xpath->findvalue('recording/@id', $track_node)->value; 61 $info{"$prefix.TITLE"} = $xpath->findvalue('recording/title', $track_node)->value; 62 $info{"$prefix.ARTIST"} = $xpath->findvalue('recording/artist-credit/name-credit/artist/name', $track_node)->value || $info{ARTIST}; 63 63 $info{TRACKS}[$tracknum]{TITLE} = $info{"$prefix.TITLE"}; 64 64 $info{TRACKS}[$tracknum]{ARTIST} = $info{"$prefix.ARTIST"};
Note: See TracChangeset
for help on using the changeset viewer.