fix(subsonic): the lint findings in artist info and the lyrics handler name
release / go (push) Successful in 2m1s
release / web (push) Successful in 1m20s
release / govulncheck (push) Successful in 19s
release / integration (push) Successful in 4m11s
release / android (push) Successful in 4m23s
release / Build signed APK (push) Successful in 5m11s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 16s
release / Verify release artifacts (tag releases only) (push) Skipped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 17:48:57 -05:00
co-authored by Claude Opus 5.5
parent f87aba5b86
commit 6dfa7b25fb
4 changed files with 17 additions and 16 deletions
+10 -9
View File
@@ -107,17 +107,18 @@ func artistOf(ctx context.Context, q *dbq.Queries, id pgtype.UUID) (dbq.Artist,
if !errors.Is(err, pgx.ErrNoRows) {
return artist, err
}
artistID := pgtype.UUID{}
if album, err := q.GetAlbumByID(ctx, id); err == nil {
artistID = album.ArtistID
} else if !errors.Is(err, pgx.ErrNoRows) {
return dbq.Artist{}, err
} else if track, err := q.GetTrackByID(ctx, id); err == nil {
artistID = track.ArtistID
} else {
album, err := q.GetAlbumByID(ctx, id)
if err == nil {
return q.GetArtistByID(ctx, album.ArtistID)
}
if !errors.Is(err, pgx.ErrNoRows) {
return dbq.Artist{}, err
}
return q.GetArtistByID(ctx, artistID)
track, err := q.GetTrackByID(ctx, id)
if err != nil {
return dbq.Artist{}, err
}
return q.GetArtistByID(ctx, track.ArtistID)
}
// getAlbumInfo serves both getAlbumInfo and getAlbumInfo2: the two take an