mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2024-11-10 13:14:16 +00:00
fix #31: handle discogs tracks in case of sub-tracks
in case of sub-tracks (at least for http://api.discogs.com/releases/5880212 ), json field "position" is "" so previous code ignored the track. The solution here is to use first sub-track position which is good enough to detect change of CD numbers.
This commit is contained in:
parent
5424744063
commit
a5138fe3d7
1 changed files with 4 additions and 0 deletions
|
@ -371,6 +371,10 @@ function parseDiscogsRelease(data) {
|
|||
// Track position and release number
|
||||
var trackPosition = discogsTrack.position;
|
||||
|
||||
if (trackPosition == "" && discogsTrack.sub_tracks) {
|
||||
trackPosition = discogsTrack.sub_tracks[0].position;
|
||||
}
|
||||
|
||||
// Skip special tracks
|
||||
if (trackPosition.toLowerCase().match("^(video|mp3)")) {
|
||||
trackPosition = "";
|
||||
|
|
Loading…
Reference in a new issue