Skip to content

Commit

Permalink
Fix getTopSongs endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
deluan committed Aug 19, 2021
1 parent aa72d3d commit 05e2709
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/external_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 05e2709

Please sign in to comment.