mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2025-01-05 14:08:43 +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 = [];
|
tracks = [];
|
||||||
}
|
}
|
||||||
var track = {};
|
var track = {};
|
||||||
track.title = trackobj.title;
|
track.title = trackobj.title.replace('"','\"');
|
||||||
track.duration = trackobj.duration * 1000;
|
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 list = v.split(', ');
|
||||||
var name = list.shift();
|
var name = list.shift();
|
||||||
return [name, list];
|
return [name, list];
|
||||||
});
|
}) || [trackobj.performer.name, ['Primary']];
|
||||||
var artists = [];
|
var artists = [];
|
||||||
var featured_artists = [];
|
var featured_artists = [];
|
||||||
$.each(performers, function(index, performer) {
|
$.each(performers, function(index, performer) {
|
||||||
|
|
Loading…
Reference in a new issue