Skip to content
This repository was archived by the owner on Sep 6, 2024. It is now read-only.

[BUG] SpotifyControls plugin lacks the ability to see when shuffle state is changed outside of discord app. #1006

Closed
3 tasks done
Floyddo opened this issue Aug 7, 2024 · 1 comment

Comments

@Floyddo
Copy link

Floyddo commented Aug 7, 2024

Plugin Description

Was told to post here by a mod

How to reproduce:

  1. Enable shuffle while playing music on the spotify app (with or without discord started up)
  2. Check the spotifycontrols plugin, the icon will not be green
    Spotify: image
    Discord:
    image

Fix?

What I think is missing (don't know exactly how it works, but it's an educated guess) is that it's not reading the shuffle value and putting in the store at SpotifyStore.ts lines 178-188:

 const store = new SpotifyStore(FluxDispatcher, {
        SPOTIFY_PLAYER_STATE(e: PlayerState) {
            store.track = e.track;
            store.device = e.device ?? null;
            store.isPlaying = e.isPlaying ?? false;
            store.volume = e.volumePercent ?? 0;
            store.repeat = e.actual_repeat || "off";
            store.position = e.position ?? 0;
            store.isSettingPosition = false;
            store.emitChange();
        },

Existing Plugin for other mod

No response

Request Agreement

  • I read the above and made sure my plugin is possible and allowed
  • I checked the existing plugins and made sure my plugin doesn't already exist
  • I searched the existing issues and made sure a similar request doesn't already exist
@Vendicated
Copy link
Member

This is simply an oversight because Discord doesn't have this data at all. But spotify does send it, so we'll need to patch the Spotify websocket event handler to grab the data

@Floyddo Floyddo closed this as completed Aug 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants