mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-17 19:26:36 -07:00
feat: refetch missing images on startup (#160)
* artist image refetching * album image refetching * remove unused var
This commit is contained in:
parent
5e294b839c
commit
1a8099e902
15 changed files with 271 additions and 44 deletions
|
|
@ -210,6 +210,9 @@ func (d *Psql) UpdateArtist(ctx context.Context, opts db.UpdateArtistOpts) error
|
|||
}
|
||||
}
|
||||
if opts.Image != uuid.Nil {
|
||||
if opts.ImageSrc == "" {
|
||||
return fmt.Errorf("UpdateAlbum: image source must be provided when updating an image")
|
||||
}
|
||||
l.Debug().Msgf("Updating artist with id %d with image %s", opts.ID, opts.Image)
|
||||
err = qtx.UpdateArtistImage(ctx, repository.UpdateArtistImageParams{
|
||||
ID: opts.ID,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue