Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/musicbrainz/bindings/artist_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ def parse(xml)
mbid: (xml.attribute('id').value rescue nil), # Old shit
name: (xml.xpath('./name').text.gsub(/[`’]/, "'") rescue nil),
sort_name: (xml.xpath('./sort-name').gsub(/[`’]/, "'") rescue nil),
area: (xml.xpath('./area').children.first.children.text rescue nil),
type: (xml.attribute('type').value rescue nil),
score: (xml.attribute('score').value.to_i rescue nil),
desc: (xml.xpath('./disambiguation').value rescue nil),
desc: (xml.xpath('./disambiguation').children.first.text rescue nil),
aliases: (xml.xpath('./alias-list/alias').map{ |xml| xml.text } rescue [])
} rescue nil
end.delete_if{ |item| item.nil? }
Expand Down