chore: remove code left from acquisition and Discover suggestions, and uncalled queries
Nothing reached any of it: - MusicBrainz search (artists, albums, songs), artist lookups and the query escaping they used. The release-group lookups the duplicate resolver uses stay. - Release-group covers, and artist-level tags for artists not in the library. - Nine named queries with no caller (CountTracksByArtist went with the previous commit), two of them describing request-progress reporting. The MusicBrainz client's retry and not-found tests now drive the release-group lookup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -218,46 +218,6 @@ func (q *Queries) ListArtists(ctx context.Context) ([]Artist, error) {
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listArtistsAlpha = `-- name: ListArtistsAlpha :many
|
||||
SELECT id, name, sort_name, mbid, created_at, updated_at, artist_thumb_path, artist_fanart_path, artist_art_source, artist_art_sources_version FROM artists ORDER BY sort_name, name, id LIMIT $1 OFFSET $2
|
||||
`
|
||||
|
||||
type ListArtistsAlphaParams struct {
|
||||
Limit int32
|
||||
Offset int32
|
||||
}
|
||||
|
||||
func (q *Queries) ListArtistsAlpha(ctx context.Context, arg ListArtistsAlphaParams) ([]Artist, error) {
|
||||
rows, err := q.db.Query(ctx, listArtistsAlpha, arg.Limit, arg.Offset)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []Artist
|
||||
for rows.Next() {
|
||||
var i Artist
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.Name,
|
||||
&i.SortName,
|
||||
&i.Mbid,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.ArtistThumbPath,
|
||||
&i.ArtistFanartPath,
|
||||
&i.ArtistArtSource,
|
||||
&i.ArtistArtSourcesVersion,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listArtistsAlphaWithCovers = `-- name: ListArtistsAlphaWithCovers :many
|
||||
SELECT artists.id, artists.name, artists.sort_name, artists.mbid, artists.created_at, artists.updated_at, artists.artist_thumb_path, artists.artist_fanart_path, artists.artist_art_source, artists.artist_art_sources_version,
|
||||
cov.id AS cover_album_id,
|
||||
|
||||
Reference in New Issue
Block a user