mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-15 10:25:55 -07:00
album image refetching
This commit is contained in:
parent
ce4bcdd7da
commit
1d44f75c27
5 changed files with 72 additions and 6 deletions
|
|
@ -274,6 +274,9 @@ func (d *Psql) UpdateAlbum(ctx context.Context, opts db.UpdateAlbumOpts) 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 release with ID %d with image %s", opts.ID, opts.Image)
|
||||
err := qtx.UpdateReleaseImage(ctx, repository.UpdateReleaseImageParams{
|
||||
ID: opts.ID,
|
||||
|
|
|
|||
|
|
@ -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