kepstin / magicisrc

JS web tool to batch-submit ISRCs to MusicBrainz
18 stars 6 forks source link

Releases with media without tracks fail to load #7

Closed kepstin closed 3 years ago

kepstin commented 3 years ago

An example release that causes this problem: https://musicbrainz.org/release/aa908649-4d88-4232-9285-3167b0c3b79c

The first medium on this release has a track-count of 0, and the tracks array is not present in the media object:

{
  "position": 1,
  "track-count": 0,
  "title": "Films",
  "format": "Blu-ray",
  "format-id": "c693c05b-3316-3d69-afc2-5e2bc455bffc"
}

This causes an exception when iterating through the media.