feat(16-02): add go-flac dependencies and implement FLAC tag writer
- Add go-flac/go-flac/v2, flacvorbis/v2, flacpicture/v2 dependencies - Create tagwriter.go with TagChanges type, field constants, format detection, MIME detection - Create flac.go with writeFlacTags using Vorbis Comments + PICTURE blocks + AtomicWrite - Implement replaceVorbisComment helper for case-insensitive field replacement - Handle cover art add/replace/clear via PICTURE metadata blocks
This commit is contained in:
@@ -9,6 +9,20 @@ import (
|
||||
"context"
|
||||
)
|
||||
|
||||
const countArtistCreditReferences = `-- name: CountArtistCreditReferences :one
|
||||
SELECT
|
||||
(SELECT COUNT(*) FROM recordings WHERE artist_credit_id = ?1) +
|
||||
(SELECT COUNT(*) FROM release_groups WHERE album_artist_credit_id = ?1)
|
||||
AS total
|
||||
`
|
||||
|
||||
func (q *Queries) CountArtistCreditReferences(ctx context.Context, artistCreditID int64) (int64, error) {
|
||||
row := q.db.QueryRowContext(ctx, countArtistCreditReferences, artistCreditID)
|
||||
var total int64
|
||||
err := row.Scan(&total)
|
||||
return total, err
|
||||
}
|
||||
|
||||
const createArtistCredit = `-- name: CreateArtistCredit :one
|
||||
INSERT INTO artist_credit (text) VALUES (?)
|
||||
RETURNING id, text
|
||||
|
||||
Reference in New Issue
Block a user