Skip to content

Empty array returned from MusicBrainz query if JSON key "releases" is missing. #35

Description

@SWalkerTTU

Performing this query:

http://musicbrainz.org/ws/2/discid/CPuVKAnEu8JT0qUWkzcdMV7wHXA-?inc=artists+labels+recordings+release-groups+artist-credits&fmt=json

with Google Chrome resulted in this:

{
"id":"CPuVKAnEu8JT0qUWkzcdMV7wHXA-",
"track-count":12,
"artist":"Sleeper",
"barcode":"0078221882422",
"tracks":[{"title":"Feeling Peaky","length":173293,"artist":null},{"length":269973,"title":"Sale of the Century","artist":null},{"artist":null,"title":"Dress Like Your Mother","length":153000},{"title":"Statuesque","length":203560,"artist":null},{"artist":null,"title":"Nice Guy Eddie","length":200600},{"artist":null,"title":"Stop Your Crying","length":215906},{"title":"Lie Detector","length":152093,"artist":null},{"artist":null,"length":221800,"title":"What Do I Do Now?"},{"title":"Shrinkwrapped","length":286440,"artist":null},{"artist":null,"title":"Good Luck Mr. Gorsky","length":245733},{"artist":null,"title":"Factor 41","length":177333},{"artist":null,"length":172933,"title":"Click...off...gone"}],
"disambiguation":"",
"title":"The it Girl"
}

As there is no "releases" key in this result, PerformMusicBrainzQuery returns an empty array. The lack of a "releases" key is likely due to changes on the MusicBrainz server.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions