Fix silly error introduced in abcde-musicbrainz-tool
[abcde.git] / abcde-musicbrainz-tool
index bcfcd84..5ad0eaa 100755 (executable)
@@ -92,12 +92,12 @@ if ($command =~ m/^id/) {
     foreach my $release (@releases) {
         my $a_artist = $release->artist()->name();
         my $va = 0;
+       my $rel_year = "";
         if ($a_artist =~ /Various Artists/) {
             $va = 1;
         }
-       my @events = @{$release->release_event_list()->events()};
-        my $rel_year = "";
-        if ($release->release_event_list()->count() > 0) {
+       if ($release->release_event_list()->count() > 0) {
+           my @events = @{$release->release_event_list()->events()};
            $rel_year =  substr($events[0]->date(),0,4);
        }
 
@@ -170,7 +170,7 @@ if ($command =~ m/^id/) {
     }
 } elsif ($command =~ m/calcid/) {
 # Calculate MusicBrainz ID from disc offsets; see
-# http://musicbrainz.org/doc/DiscIDCalculation
+# https://musicbrainz.org/doc/DiscIDCalculation
 
 
     if ($#discinfo < 5) {