fix(loopyLoop): loop between markers when repeat-one is active#3833
fix(loopyLoop): loop between markers when repeat-one is active#3833rxri merged 2 commits intospicetify:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughModified loopyLoop's onprogress handler to respect Spotify repeat mode: when playback reaches the configured end marker, it either seeks back to the loop start for repeat-one, or advances to the next track for other repeat modes. A new state tracks recent repeat-one seeks and resets on song change. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Extensions/loopyLoop.js`:
- Around line 301-314: The shared 2s throttle variable lastNextCall is blocking
short repeat-one loops; create and use a separate, shorter timestamp throttle
(e.g., lastEndLoopSeek) for the repeat-one seek path inside the block that calls
Spicetify.Player.seek(start ?? 0) so seeks are only gated by ~500ms (matching
lastStartEnforce) while preserving the existing 2s throttle for the
Spicetify.Player.next() branch that uses lastNextCall and seekStartPendingUri;
also reset lastEndLoopSeek in the songchange handler alongside the other timers
so it doesn't persist across tracks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: fc70a277-bf7a-4ff9-8010-d8ed6e36a827
📒 Files selected for processing (1)
Extensions/loopyLoop.js
Fixes not looping on repeat one.
#3771 (comment)
Summary by CodeRabbit