[GH-ISSUE #5165] [Issue]: Music DJ queue turns off enabled Spotify repeat #2861

Closed
opened 2026-10-21 05:57:05 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @SpicyMarinara on GitHub (Aug 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5165

Originally assigned to: @SpicyMarinara on GitHub.

Summary

When Spotify repeat is enabled, starting a multi-song queue through Music DJ can switch repeat off and leave it off. The queue plays once and then stops instead of repeating.

Expected behavior

  • Preserve the user's enabled Spotify repeat intent when Music DJ replaces the active playback context.
  • For a generated multi-track selection, map either enabled repeat mode to Spotify context repeat so the complete selection loops.
  • Preserve that intent across delayed playback verification, retries, device transfer, and fallback playback paths.
  • Never leave repeat off merely because an intermediate verification attempt failed.
  • Keep explicitly disabled repeat off.
  • Preserve track repeat for single-track playback where appropriate.
  • Verify the final Spotify playback snapshot before reporting success.

Actual behavior

The spotify_play implementation reads the current repeat state and, for a repeatable multi-track selection, deliberately calls clearSpotifyRepeatBeforePlayback() before replacing Spotify's playback context.

Repeat is restored to context only inside this condition:

if (repeatTrackList && playbackVerified && current?.repeatState !== "context")

If Spotify accepts playback but verification is delayed or fails once, repeat remains off. A fallback or retry then takes a fresh playback snapshot, sees repeatState === "off", loses the original repeat intent, and starts the queue through the non-repeating path. This matches the reported behavior: playback begins, the repeat control turns off, and the songs never loop.

Steps to reproduce

  1. Connect Spotify and enable repeat in Marinara's Spotify player.
  2. Let Music DJ select and start a queue containing multiple tracks.
  3. Watch the repeat control as the new queue begins.
  4. Observe that repeat changes to off.
  5. Let the queue finish and observe that it does not repeat.

Environment

  • Marinara Engine version: 2.4.3 source inspected; reporter runtime version not provided
  • Install type: Not provided
  • OS + version: Not provided
  • Browser or app shell: Not provided

Logs, screenshots, or video

No logs were provided.

Additional context

The affected host-integration path is spotifyPlay() in packages/server/src/services/tools/tool-executor.ts, so this belongs in Marinara Engine rather than the downloadable Marinara-Agents package.

Regression coverage should include:

  • Previous Spotify state is track, the first playback verification is delayed or fails, and the final multi-track selection still ends in context repeat.
  • Previous Spotify state is context with the same delayed/retry path.
  • Previous Spotify state is off and remains off.
  • A failed playback attempt restores or preserves the user's repeat state instead of leaving it disabled.
  • A fallback spotify_play call inherits the original repeat intent rather than re-inferring it from the temporarily cleared Spotify state.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Aug 16, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5165 Originally assigned to: @SpicyMarinara on GitHub. ## Summary When Spotify repeat is enabled, starting a multi-song queue through Music DJ can switch repeat off and leave it off. The queue plays once and then stops instead of repeating. ## Expected behavior - Preserve the user's enabled Spotify repeat intent when Music DJ replaces the active playback context. - For a generated multi-track selection, map either enabled repeat mode to Spotify `context` repeat so the complete selection loops. - Preserve that intent across delayed playback verification, retries, device transfer, and fallback playback paths. - Never leave repeat off merely because an intermediate verification attempt failed. - Keep explicitly disabled repeat off. - Preserve `track` repeat for single-track playback where appropriate. - Verify the final Spotify playback snapshot before reporting success. ## Actual behavior The `spotify_play` implementation reads the current repeat state and, for a repeatable multi-track selection, deliberately calls `clearSpotifyRepeatBeforePlayback()` before replacing Spotify's playback context. Repeat is restored to `context` only inside this condition: ```ts if (repeatTrackList && playbackVerified && current?.repeatState !== "context") ``` If Spotify accepts playback but verification is delayed or fails once, repeat remains off. A fallback or retry then takes a fresh playback snapshot, sees `repeatState === "off"`, loses the original repeat intent, and starts the queue through the non-repeating path. This matches the reported behavior: playback begins, the repeat control turns off, and the songs never loop. ## Steps to reproduce 1. Connect Spotify and enable repeat in Marinara's Spotify player. 2. Let Music DJ select and start a queue containing multiple tracks. 3. Watch the repeat control as the new queue begins. 4. Observe that repeat changes to off. 5. Let the queue finish and observe that it does not repeat. ## Environment - Marinara Engine version: 2.4.3 source inspected; reporter runtime version not provided - Install type: Not provided - OS + version: Not provided - Browser or app shell: Not provided ## Logs, screenshots, or video No logs were provided. ## Additional context The affected host-integration path is `spotifyPlay()` in `packages/server/src/services/tools/tool-executor.ts`, so this belongs in Marinara Engine rather than the downloadable Marinara-Agents package. Regression coverage should include: - Previous Spotify state is `track`, the first playback verification is delayed or fails, and the final multi-track selection still ends in `context` repeat. - Previous Spotify state is `context` with the same delayed/retry path. - Previous Spotify state is `off` and remains off. - A failed playback attempt restores or preserves the user's repeat state instead of leaving it disabled. - A fallback `spotify_play` call inherits the original repeat intent rather than re-inferring it from the temporarily cleared Spotify state. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [x] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:57:05 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2861
No description provided.