]> git.ktnx.net Git - mpd-feeder.git/commitdiff
fix filling album information
authorDamyan Ivanov <dmn@debian.org>
Thu, 11 Nov 2021 20:03:47 +0000 (20:03 +0000)
committerDamyan Ivanov <dmn@debian.org>
Thu, 11 Nov 2021 20:03:47 +0000 (20:03 +0000)
some songs have Artist, some have AlbumArtist. mpd-feeder prefers the
later, but takes the former too

bin/mpd-feeder

index d553ea3e1d885980f1d851a11da7a45d4688112f..42e3f7bb4516f55e8259ed36a001a89c17bb349a 100755 (executable)
@@ -299,7 +299,8 @@ SQL
             foreach my $entry (@$rows) {
                 next unless exists $entry->{file};
                 $self->db_store_song( $entry->{file},
-                    $entry->{AlbumArtist}, $entry->{Album} );
+                    $entry->{AlbumArtist} // $entry->{Artist},
+                    $entry->{Album} );
                 $song_count++;
             }