Cope with simple musicbrainz errors, e.g. disc not found
authorSteve McIntyre <steve@einval.com>
Fri, 9 Mar 2018 15:02:07 +0000 (15:02 +0000)
committerSteve McIntyre <steve@einval.com>
Fri, 9 Mar 2018 15:02:07 +0000 (15:02 +0000)
abcde-musicbrainz-tool

index bf8d71a..0a5bf77 100755 (executable)
@@ -89,6 +89,12 @@ if ($command =~ m/^id/) {
        discid => $discid,
        inc => ['artists', 'artist-credits', 'recordings']
         });
+
+    if ($response->{'error'}) {
+       print STDERR "MusicBrainz lookup returned an error \"$response->{'error'}\"\n";
+       exit(0);
+    }
+
     my @releases = @{ $response->{'releases'} };
     my $releasenum = $start;
     my @sums;