mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2024-12-13 20:02:27 +00:00
qobuz_importer.user.js: Fix single performer, fix quotes in title.
Fix parsing error when performers is missing, use performer for trackobj. Fix import error bad request 400 with quoted track titles.
This commit is contained in:
parent
667090ca7d
commit
5dd6eda4d1
1 changed files with 3 additions and 3 deletions
|
@ -83,13 +83,13 @@ function parseRelease(data) {
|
|||
tracks = [];
|
||||
}
|
||||
var track = {};
|
||||
track.title = trackobj.title;
|
||||
track.title = trackobj.title.replace('"','\"');
|
||||
track.duration = trackobj.duration * 1000;
|
||||
var performers = trackobj.performers.split('\r - ').map(function(v) {
|
||||
var performers = (typeof trackobj.performers !== 'undefined') && trackobj.performers.split('\r - ').map(function(v) {
|
||||
var list = v.split(', ');
|
||||
var name = list.shift();
|
||||
return [name, list];
|
||||
});
|
||||
}) || [trackobj.performer.name, ['Primary']];
|
||||
var artists = [];
|
||||
var featured_artists = [];
|
||||
$.each(performers, function(index, performer) {
|
||||
|
|
Loading…
Reference in a new issue