Pre-release version v0.0.13 (#52)

* feat: search/merge items by id

* feat: update track duration using musicbrainz

* chore: changelog

* fix: make username updates case insensitive

* feat: add minutes listened to ui and fix image drop

* chore: changelog

* fix: embed db migrations (#37)

* feat: Add support for ARM in publish workflow (#51)

* chore: changelog

* docs: search by id and custom theme support

---------

Co-authored-by: potatoattack <lvl70nub@gmail.com>
Co-authored-by: Benjamin Jonard <benjaminjonard@users.noreply.github.com>
This commit is contained in:
Gabe Farrell 2025-07-26 15:57:46 -04:00 committed by GitHub
parent 5537b6fb89
commit 5419178012
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 1252 additions and 100 deletions

View file

@ -85,13 +85,26 @@ func (q *Queries) DeleteReleasesFromArtist(ctx context.Context, artistID int32)
}
const getRelease = `-- name: GetRelease :one
SELECT id, musicbrainz_id, image, various_artists, image_source, title FROM releases_with_title
SELECT
id, musicbrainz_id, image, various_artists, image_source, title,
get_artists_for_release(id) AS artists
FROM releases_with_title
WHERE id = $1 LIMIT 1
`
func (q *Queries) GetRelease(ctx context.Context, id int32) (ReleasesWithTitle, error) {
type GetReleaseRow struct {
ID int32
MusicBrainzID *uuid.UUID
Image *uuid.UUID
VariousArtists bool
ImageSource pgtype.Text
Title string
Artists []byte
}
func (q *Queries) GetRelease(ctx context.Context, id int32) (GetReleaseRow, error) {
row := q.db.QueryRow(ctx, getRelease, id)
var i ReleasesWithTitle
var i GetReleaseRow
err := row.Scan(
&i.ID,
&i.MusicBrainzID,
@ -99,6 +112,7 @@ func (q *Queries) GetRelease(ctx context.Context, id int32) (ReleasesWithTitle,
&i.VariousArtists,
&i.ImageSource,
&i.Title,
&i.Artists,
)
return i, err
}