mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-16 10:55:55 -07:00
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:
parent
5537b6fb89
commit
5419178012
32 changed files with 1252 additions and 100 deletions
|
|
@ -2,6 +2,7 @@ package psql
|
|||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
|
@ -34,6 +35,10 @@ func (d *Psql) GetTrack(ctx context.Context, opts db.GetTrackOpts) (*models.Trac
|
|||
Image: t.Image,
|
||||
Duration: t.Duration,
|
||||
}
|
||||
err = json.Unmarshal(t.Artists, &track.Artists)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("GetTrack: json.Unmarshal: %w", err)
|
||||
}
|
||||
} else if opts.MusicBrainzID != uuid.Nil {
|
||||
l.Debug().Msgf("Fetching track from DB with MusicBrainz ID %s", opts.MusicBrainzID)
|
||||
t, err := d.q.GetTrackByMbzID(ctx, &opts.MusicBrainzID)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue