diff --git a/src/main.sh b/src/main.sh index f74f00e..a01f3fb 100755 --- a/src/main.sh +++ b/src/main.sh @@ -75,10 +75,10 @@ if [ "${1:-}" = "--internal-search" ]; then true else api_mb_search_releasegroup "$3" | - $JQ -r '."release-groups"[] | [ + $JQ -r '."release-groups"[] | [ .id, ."primary-type", - (."secondary-types"|join(";")), + (."secondary-types" // []|join(";")), ."first-release-date", .title, (."artist-credit" | map(([.name, .joinphrase]|join(""))) | join("")) @@ -132,7 +132,7 @@ if [ "${1:-}" = "--internal-list-releasegroups" ]; then $JQ -r '."release-groups"[] | [ .id, ."primary-type", - (."secondary-types"|join(";")), + (."secondary-types" // []|join(";")), ."first-release-date", .title, (."artist-credit" | map(([.name, .joinphrase]|join(""))) | join("")) diff --git a/src/sh/api.sh b/src/sh/api.sh index bf3004c..9001571 100644 --- a/src/sh/api.sh +++ b/src/sh/api.sh @@ -65,6 +65,7 @@ api_mb_search_releasegroup() { $CURL \ --get \ --data fmt=json \ + --data inc=artist-credits \ --data-urlencode query="$1" \ -A "$APP_NAME/$APP_VERSION ($APP_WEBSITE)" \ "https://musicbrainz.org/ws/2/release-group"