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:
@@ -39,39 +39,6 @@ func (q *Queries) ClearAlbumCoverNone(ctx context.Context, id pgtype.UUID) error
|
||||
return err
|
||||
}
|
||||
|
||||
const countAlbumCoverSources = `-- name: CountAlbumCoverSources :one
|
||||
SELECT
|
||||
COUNT(*) FILTER (WHERE cover_art_source IS NULL) ::bigint AS untried,
|
||||
COUNT(*) FILTER (WHERE cover_art_source = 'sidecar') ::bigint AS sidecar,
|
||||
COUNT(*) FILTER (WHERE cover_art_source = 'embedded')::bigint AS embedded,
|
||||
COUNT(*) FILTER (WHERE cover_art_source = 'mbcaa') ::bigint AS mbcaa,
|
||||
COUNT(*) FILTER (WHERE cover_art_source = 'none') ::bigint AS none
|
||||
FROM albums
|
||||
`
|
||||
|
||||
type CountAlbumCoverSourcesRow struct {
|
||||
Untried int64
|
||||
Sidecar int64
|
||||
Embedded int64
|
||||
Mbcaa int64
|
||||
None int64
|
||||
}
|
||||
|
||||
// Diagnostic for the admin overview: counts by source, including NULL.
|
||||
// Returns one row with named tallies.
|
||||
func (q *Queries) CountAlbumCoverSources(ctx context.Context) (CountAlbumCoverSourcesRow, error) {
|
||||
row := q.db.QueryRow(ctx, countAlbumCoverSources)
|
||||
var i CountAlbumCoverSourcesRow
|
||||
err := row.Scan(
|
||||
&i.Untried,
|
||||
&i.Sidecar,
|
||||
&i.Embedded,
|
||||
&i.Mbcaa,
|
||||
&i.None,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const getAlbumWithFirstTrackPath = `-- name: GetAlbumWithFirstTrackPath :one
|
||||
SELECT a.id, a.mbid, a.title, a.cover_art_path, a.cover_art_source,
|
||||
ar.name AS artist_name,
|
||||
|
||||
Reference in New Issue
Block a user