mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #660] [MERGED] fix(spotify/game): target SDK device when no playback session is active #4716
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4716
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/660
Author: @Romuromylus
Created: 5/10/2026
Status: ✅ Merged
Merged: 5/10/2026
Merged by: @Romuromylus
Base:
main← Head:fix/spotify-game-device-fallback📝 Commits (1)
a4b0941fix(spotify/game): target SDK device when no playback session is active📊 Changes
2 files changed (+52 additions, -6 deletions)
View changed files
📝
packages/client/src/components/game/GameSurface.tsx(+1 -1)📝
packages/server/src/services/spotify/game-spotify-music.service.ts(+51 -5)📄 Description
Linked issue
Closes #659
Why this change
Game Mode scene music silently fails with a generic "Spotify scene music failed." toast whenever the user has no currently-active Spotify playback session, even when the in-app Web Playback SDK has registered "Marinara Engine" as an available device. The play call is sent without a
device_id, so Spotify returns 404NO_ACTIVE_DEVICE. This is the common case for users on the web build who haven't manually started Spotify elsewhere.What changed
packages/server/src/services/spotify/game-spotify-music.service.tsfindAvailablePlaybackDevicehelper that callsGET /me/player/devicesand picks a target (active → "Marinara Engine" SDK device by name → any non-restricted device).playGameSpotifyTracknow falls back to this helper when the active-session snapshot has nodeviceId, and uses the resolved id consistently in the play request and bothsetSpotifyRepeatcalls.packages/client/src/components/game/GameSurface.tsxplaySpotifySceneTracknow surfaceserror.messagein the toast instead of the generic "Spotify scene music failed.", so the new actionable hint reaches the user.The mini-player's manual playback flow (
SpotifyMiniPlayer.runControl) already passes adevice_idfrom the SDKreadyevent and is unaffected.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
deviceIdand the fallback isn't invoked.Docs and release impact
UI evidence (if applicable)
N/A — the visible change is the toast text path; no layout or theming changes.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.