Skip to content

Include unlisted tracks in playlist responses#755

Merged
rickyrombo merged 2 commits intomainfrom
mjp-include-unlisted-playlist-tracks
Apr 8, 2026
Merged

Include unlisted tracks in playlist responses#755
rickyrombo merged 2 commits intomainfrom
mjp-include-unlisted-playlist-tracks

Conversation

@rickyrombo
Copy link
Copy Markdown
Contributor

Summary

  • Unlisted tracks added to playlists were being filtered out by the get_tracks query's is_unlisted = false filter
  • This caused a mismatch where playlist_contents listed the track ID but the hydrated tracks array was missing it
  • Sets IncludeUnlisted: true for both GET /v1/playlists/:id (via ParallelParams) and GET /v1/playlists/:id/tracks

Test plan

  • Fetch a playlist containing an unlisted track via GET /v1/playlists/:id and verify the track appears in the tracks array
  • Fetch playlist tracks via GET /v1/playlists/:id/tracks and verify unlisted tracks are included
  • Verify non-playlist track endpoints still respect the unlisted filter

🤖 Generated with Claude Code

Unlisted tracks added to playlists were being filtered out by the
get_tracks query, causing a mismatch between playlist_contents and
the hydrated tracks array. This sets IncludeUnlisted=true for both
GET /v1/playlists/:id and GET /v1/playlists/:id/tracks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates playlist track hydration so unlisted tracks included in a playlist are also included in the API’s hydrated tracks arrays, eliminating mismatches between playlist_contents and tracks.

Changes:

  • Include unlisted tracks when hydrating GET /v1/playlists/:id/tracks.
  • Include unlisted tracks when hydrating playlists via dbv1.PlaylistsKeyed (affects GET /v1/playlists/:id and any other playlist responses that hydrate tracks via this path).
  • Add IncludeUnlisted to dbv1.ParallelParams and plumb it through to track hydration in Parallel().

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
api/v1_playlist_tracks.go Ensures playlist track listing hydration includes unlisted tracks.
api/dbv1/playlists.go Ensures playlist hydration includes unlisted tracks when loading tracks in parallel.
api/dbv1/parallel.go Adds/propagates IncludeUnlisted through parallel track loading.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Covers both GET /v1/playlists/:id (hydrated tracks array) and
GET /v1/playlists/:id/tracks with unlisted track fixtures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rickyrombo rickyrombo merged commit bdeae40 into main Apr 8, 2026
5 checks passed
@rickyrombo rickyrombo deleted the mjp-include-unlisted-playlist-tracks branch April 8, 2026 23:07
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.

2 participants