Fix getTopSongs endpoint

This commit is contained in:
Deluan 2021-08-19 08:17:22 -04:00 committed by Joe Stump
parent 3891be78e9
commit 040a0b1686
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

View File

@ -226,6 +226,11 @@ func (e *externalMetadata) getMatchingTopSongs(ctx context.Context, agent agents
break
}
}
if len(mfs) == 0 {
log.Debug(ctx, "No matching top songs found", "name", artist.Name)
} else {
log.Debug(ctx, "Found matching top songs", "name", artist.Name, "numSongs", len(mfs))
}
return mfs, nil
}
@ -331,7 +336,7 @@ func (e *externalMetadata) mapSimilarArtists(ctx context.Context, similar []agen
func (e *externalMetadata) findArtistByName(ctx context.Context, artistName string) (*auxArtist, error) {
artists, err := e.ds.Artist(ctx).GetAll(model.QueryOptions{
Filters: squirrel.Like{"name": artistName},
Filters: squirrel.Like{"artist.name": artistName},
Max: 1,
})
if err != nil {