diff --git a/src/plugins/spotifyControls/SpotifyStore.ts b/src/plugins/spotifyControls/SpotifyStore.ts index d65be74d..f940d8d5 100644 --- a/src/plugins/spotifyControls/SpotifyStore.ts +++ b/src/plugins/spotifyControls/SpotifyStore.ts @@ -71,7 +71,7 @@ export const SpotifyStore = proxyLazy(() => { const { Store } = Flux; const SpotifySocket = findByPropsLazy("getActiveSocketAndDevice"); - const SpotifyAPI = findByPropsLazy("SpotifyAPIMarker"); + const SpotifyUtils = findByPropsLazy("SpotifyAPI"); const API_BASE = "https://api.spotify.com/v1/me/player"; @@ -169,7 +169,7 @@ export const SpotifyStore = proxyLazy(() => { (data.query ??= {}).device_id = this.device.id; const { socket } = SpotifySocket.getActiveSocketAndDevice(); - return SpotifyAPI[method](socket.accountId, socket.accessToken, { + return SpotifyUtils.SpotifyAPI[method](socket.accountId, socket.accessToken, { url: API_BASE + route, ...data }); diff --git a/src/plugins/spotifyControls/index.tsx b/src/plugins/spotifyControls/index.tsx index fa1e8960..829f7850 100644 --- a/src/plugins/spotifyControls/index.tsx +++ b/src/plugins/spotifyControls/index.tsx @@ -59,8 +59,8 @@ export default definePlugin({ { find: ".PLAYER_DEVICES", replacement: { - match: /get:(.{1,3})\.bind\(null,(.{1,6})\.get\)/, - replace: "SpotifyAPIMarker:1,post:$1.bind(null,$2.post),$&" + match: /get:(\i)\.bind\(null,(\i\.\i)\.get\)/, + replace: "post:$1.bind(null,$2.post),$&" } }, // Discord doesn't give you the repeat kind, only a boolean