Repository navigation
fix(autoplay): reject long tracks, boost Spotify, strip tribute/duration noise - #594
Conversation
- hard-reject candidates with durationMS > 15 min (7-hour looped videos no longer slip through) - spotify score boost 0.15 -> 0.4 so spotify decisively beats youtube fallbacks - low-quality penalty -0.4 for legendado/traduzido/traducao in resolved title - noise patterns: strip (Tributo ao X), (Homenagem...), HH:MM:SS duration annotations - noiseTerms.json: add legendas to bareTitleNoise - 12 new tests (2188 total, all green)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR enhances the bot's music queue processing by expanding noise term handling with "legendas", implementing track duration rejection (>15 minutes), penalizing low-quality uploads matching subtitle/translation patterns, increasing Spotify source preference scoring, and adding title cleaning for tribute and duration annotations. 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 |
|
…#594) - hard-reject candidates with durationMS > 15 min (7-hour looped videos no longer slip through) - spotify score boost 0.15 -> 0.4 so spotify decisively beats youtube fallbacks - low-quality penalty -0.4 for legendado/traduzido/traducao in resolved title - noise patterns: strip (Tributo ao X), (Homenagem...), HH:MM:SS duration annotations - noiseTerms.json: add legendas to bareTitleNoise - 12 new tests (2188 total, all green)



What
Three root causes behind the issues visible in the screenshot (7-hour video queued, duplicates of now-playing, all tracks from YouTube):
1. Hard-reject tracks > 15 minutes
calculateRecommendationScorepreviously gave tracks over 7 min a-0.2penalty — a 7-hour looped YouTube upload still scored high enough to win. Now anything above 15 min returns-Infinityand is dropped at scoring time, covering all candidate paths (seed search, Last.fm, broad fallback).2. Spotify boost
+0.15 → +0.4The old boost was too weak — when Spotify search returned results they were barely beating YouTube candidates. With
+0.4, a Spotify result wins decisively unless the track has a blocking reason (disliked, blocked artist, etc.).3. Low-quality upload penalty
-0.4Tracks whose resolved title still contains
legendado / traduzido / tradução / legendaspenalised by-0.4. Eliminates YouTube fan-upload junk even when Spotify fallback fires.4. New noise patterns (dedup key improvement)
(Tributo ao Batman)/[Tributo a Led Zeppelin]stripped → core key now matches the clean title(Homenagem a X)stripped(HH:MM:SS)duration annotations stripped (e.g.(07:05:14)from looped uploads)legendasadded tobareTitleNoiseThese ensure
purgeDuplicatesOfCurrentTrackandisDuplicateCandidatecorrectly match tribute/fan-annotated versions of the now-playing track.Tests
12 new tests — 2188 total, all green.
Summary by CodeRabbit
New Features
Tests