Add personal library playlist search to find_music#105
Add personal library playlist search to find_music#105devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Search the user's Apple Music library playlists alongside the existing catalog search. Results are returned in a separate library_playlists array so callers can distinguish library vs catalog playlists. Uses MusicLibrarySearchRequest for efficient server-side search with a MusicLibraryRequest<Playlist> fallback for client-side filtering when the search endpoint is unavailable. Co-Authored-By: bot_apk <apk@cognition.ai>
Original prompt from API User
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary
find_musicnow searches the user's personal Apple Music library playlists alongside the existing catalog search. This lets the user say "play my Sound Bath Journey playlist" and have Loop find it from their library.What changed:
MusicController.findMusic()now returns alibrary_playlistsarray in addition to the existingsongs,albums,playlists(catalog) keys. The catalog search is untouched.Search strategy:
MusicLibrarySearchRequest(term:types:)for efficient server-side library searchMusicLibraryRequest<Playlist>()→ fetch all → client-sidename.contains(query)filter[]— catalog results are still returned normallyResponse shape change (additive only):
{ "status": "ok", "songs": [...], "albums": [...], "playlists": [...], // catalog playlists (unchanged) "library_playlists": [ // NEW — user's personal library { "id": "p.abc123", "type": "library_playlist", "title": "Sound Bath Journey", "source": "library" } ] }MusicSkill.systemPromptFragmentand thefind_musictool description updated to mention library playlists so the LLM knows to look at them.How to test:
find_musicwith a query matching a personal library playlist name.library_playlistscontains the match, andplaylistsstill has catalog results.id(e.g.p.…) toplay_musicwithtarget_type: "playlist"— playback should work (the existingplay()already handlesp.-prefixed library IDs).Link to Devin session: https://app.devin.ai/sessions/a362cf082d6b47d18ca994b09ee23e7f