getSong was public and returned the full song document, including absolute server file paths, to anyone who could reach Convex. The streaming routes also called it without the listener's token, so the Next proxy was the only auth layer. Most browse and search queries had no auth either.
Changes
getSong stays public so share links and link previews keep working, but no longer returns files.
New getSongSource query returns file paths and requires auth. The play, HLS, and segment routes call it with the listener's token through lib/server-song.ts. Mobile sends the auth cookies, so it works the same way.
The HLS segment route now resolves the source on every request, so a cached job no longer skips the auth check.
Library browse, search, recently added, album/playlist summaries and tracks, and song-ID queries now require a session. Reactive queries return empty results when signed out, and imperative lookups throw.
These stay public on purpose: browseAlbumDetail, browseArtistDetail, and browsePlaylistDetail for /album, /artist, and /playlist share links, plus get{Album,Artist,Playlist}Cover, which now return only the cover path.
proxy.ts: replaced the stale /artists/:id public route with /library/artists/:id. Its metadata now uses the public browseArtistDetail query.
Verification
Web and mobile typecheck and web lint pass.
I haven't run it against a live backend, since that needs this Convex code deployed.
`getSong` was public and returned the full song document, including absolute server file paths, to anyone who could reach Convex. The streaming routes also called it without the listener's token, so the Next proxy was the only auth layer. Most browse and search queries had no auth either.
**Changes**
- `getSong` stays public so share links and link previews keep working, but no longer returns `files`.
- New `getSongSource` query returns file paths and requires auth. The play, HLS, and segment routes call it with the listener's token through `lib/server-song.ts`. Mobile sends the auth cookies, so it works the same way.
- The HLS segment route now resolves the source on every request, so a cached job no longer skips the auth check.
- Library browse, search, recently added, album/playlist summaries and tracks, and song-ID queries now require a session. Reactive queries return empty results when signed out, and imperative lookups throw.
- These stay public on purpose: `browseAlbumDetail`, `browseArtistDetail`, and `browsePlaylistDetail` for `/album`, `/artist`, and `/playlist` share links, plus `get{Album,Artist,Playlist}Cover`, which now return only the cover path.
- `proxy.ts`: replaced the stale `/artists/:id` public route with `/library/artists/:id`. Its metadata now uses the public `browseArtistDetail` query.
**Verification**
- Web and mobile typecheck and web lint pass.
- I haven't run it against a live backend, since that needs this Convex code deployed.
🤖 Generated with [Claude Code](https://claude.com/claude-code) (Claude Opus 5.5)
getSong stays public for share-link previews but no longer returns
files. Streaming routes load paths through getSongSource, which
requires auth and runs with the listener's token. Library browse,
search, and song-ID queries now require a session; album, artist,
and playlist detail plus cover lookups stay public for share links.
Fixes the stale /artists/:id public route in proxy.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
getSongwas public and returned the full song document, including absolute server file paths, to anyone who could reach Convex. The streaming routes also called it without the listener's token, so the Next proxy was the only auth layer. Most browse and search queries had no auth either.Changes
getSongstays public so share links and link previews keep working, but no longer returnsfiles.getSongSourcequery returns file paths and requires auth. The play, HLS, and segment routes call it with the listener's token throughlib/server-song.ts. Mobile sends the auth cookies, so it works the same way.browseAlbumDetail,browseArtistDetail, andbrowsePlaylistDetailfor/album,/artist, and/playlistshare links, plusget{Album,Artist,Playlist}Cover, which now return only the cover path.proxy.ts: replaced the stale/artists/:idpublic route with/library/artists/:id. Its metadata now uses the publicbrowseArtistDetailquery.Verification
🤖 Generated with Claude Code (Claude Opus 5.5)