Repository navigation
feat(bot): prioritize Spotify source in autoplay search and scoring - #585
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (7)
📝 WalkthroughWalkthroughUpdated music queue manipulation to prioritize Spotify tracks during autoplay candidate selection. Modified Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



Problem
Autoplay was falling back to YouTube silently because:
"Beyoncé - Halo Beyoncé"for seed title"Beyoncé - Halo") → Spotify returned 0 results → silent YouTube fallbackChanges
Better Spotify query (
searchSeedCandidates)Uses
extractSongCore + cleanAuthorto build a clean query for the Spotify engine:"Ed Sheeran - Shape of You"→ Spotify query:"Shape of You Ed Sheeran"(was:"Ed Sheeran - Shape of You Ed Sheeran")"Beyoncé - Halo"(author: BeyoncéVEVO) → Spotify query:"Halo Beyoncé"(was:"Beyoncé - Halo Beyoncé")Spotify source preference in scoring (
calculateRecommendationScore)-0.25) when both current and candidate are Spotify — this was actively penalizing Spotify tracks+0.08"spotify mood match" (only when both tracks were Spotify) with a general+0.15"spotify preferred" boost for any Spotify candidateNet effect: Spotify candidates now score +0.15 higher than equivalent YouTube candidates. When Spotify has the track, it wins.
Tests
Summary by CodeRabbit
Tests
Improvements