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:
@@ -10,6 +10,17 @@ import (
|
||||
"database/sql"
|
||||
)
|
||||
|
||||
const countRecordingsByArtistCredit = `-- name: CountRecordingsByArtistCredit :one
|
||||
SELECT COUNT(*) FROM recordings WHERE artist_credit_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountRecordingsByArtistCredit(ctx context.Context, artistCreditID int64) (int64, error) {
|
||||
row := q.db.QueryRowContext(ctx, countRecordingsByArtistCredit, artistCreditID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const createRecording = `-- name: CreateRecording :one
|
||||
INSERT INTO recordings (name, artist_credit_id) VALUES (?, ?)
|
||||
RETURNING id, name, artist_credit_id, track_number, disc_number, year, genre, composer, lyrics, comment
|
||||
|
||||
Reference in New Issue
Block a user