fix(api): clamp negative offset instead of erroring + clarify duration_sec=0
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -117,6 +117,7 @@ func (h *handlers) resolveAlbumRefs(ctx context.Context, q *dbq.Queries, albums
|
||||
h.logger.Error("api: count tracks for album failed", "err", cerr)
|
||||
return nil, cerr
|
||||
}
|
||||
// durationSec=0: not aggregated for search album refs per spec data flow.
|
||||
items = append(items, albumRefFrom(a, names[uuidToString(a.ArtistID)], int(count), 0))
|
||||
}
|
||||
return items, nil
|
||||
|
||||
Reference in New Issue
Block a user