Skip to content

feat(tracks): make ID3 tag query params opt-in via ?id3=true#808

Merged
raymondjacobson merged 1 commit into
mainfrom
rj-id3-opt-in
May 14, 2026
Merged

feat(tracks): make ID3 tag query params opt-in via ?id3=true#808
raymondjacobson merged 1 commit into
mainfrom
rj-id3-opt-in

Conversation

@raymondjacobson
Copy link
Copy Markdown
Member

@raymondjacobson raymondjacobson commented May 14, 2026

Summary

  • Stream and preview URLs returned by the track endpoints currently include id3=true&id3_artist=...&id3_title=... unconditionally. Those query params force validator nodes to proxy the audio bytes server-side so they can prepend an ID3v2 tag, which bypasses the presigned-blob-storage redirect path that runs on validator nodes with OPENAUDIO_BLOB_STORAGE_STREAMING=true.
  • After this change, ID3 tags are opt-in: a request with ?id3=true gets a URL with the id3 params (server proxies, tag injected); any other request gets a URL without them (validator can redirect straight to a presigned object-storage URL).
  • The plumbing reuses the established c.Localsctx.Value bridge used by solanaWalletMiddleware. A tiny middleware reads ?id3=true and stashes a bool on the request context; dbv1.TracksKeyed gates the id3Tags construction on it. No handler thread-through needed — the param works on every endpoint that returns tracks (single track, listings, search, trending, playlists, feed, etc.).

Why

The current behavior is the default that was wired up in #272 / AudiusProject/audiusd#152 — those PRs framed it as scaffolding for a future DDEX-driven flow on the validator side, with no recorded product requirement that ID3 must be in the byte stream for every stream/preview URL.

For web players that render their own metadata (and use MediaSession for OS-level "now playing"), the ID3 tag in the byte stream is unused — and now actively harmful because it forces the validator to skip presigned redirects. Making it opt-in lets those callers drop id3=true and get presigned redirects today, while download/share flows that hand the raw URL to non-browser players can keep it.

Test plan

  • go build ./... passes
  • go vet ./... passes
  • make test (couldn't run locally — port 21300 held by an unrelated container)
  • Smoke test against creatornode2.audius.co: hit a stream URL without ?id3=true, confirm 307 to a presigned blob URL; hit again with ?id3=true, confirm proxied bytes with ID3 tag intact

🤖 Generated with Claude Code

Stream and preview URLs returned by track endpoints unconditionally
included id3=true&id3_artist=...&id3_title=... query params. Those
params force the validator node to proxy bytes server-side so it can
prepend an ID3v2 tag, which bypasses the new presigned-blob-storage
redirect path on validator nodes with OPENAUDIO_BLOB_STORAGE_STREAMING
enabled.

Make ID3 tag injection opt-in: callers that need it (e.g. download or
share flows that hand the raw URL to a non-browser player) pass
?id3=true; web players that render their own metadata get the default
no-id3 URLs and benefit from presigned redirects.

Implementation reuses the c.Locals -> ctx.Value bridge established by
solanaWalletMiddleware: a tiny middleware reads ?id3=true and stashes
a bool, and dbv1.TracksKeyed gates id3Tags construction on it. No
handler thread-through needed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@raymondjacobson raymondjacobson merged commit 8b82c68 into main May 14, 2026
5 checks passed
@raymondjacobson raymondjacobson deleted the rj-id3-opt-in branch May 14, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant