From eb77b26c6f59100bb3bf739b16736909eb2cbcee Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 3 Nov 2022 12:27:27 +0100 Subject: [PATCH] Update SpotifyControls.plugin.js --- Plugins/SpotifyControls/SpotifyControls.plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/SpotifyControls/SpotifyControls.plugin.js b/Plugins/SpotifyControls/SpotifyControls.plugin.js index dfd986565a..8476ac6d9f 100644 --- a/Plugins/SpotifyControls/SpotifyControls.plugin.js +++ b/Plugins/SpotifyControls/SpotifyControls.plugin.js @@ -85,7 +85,7 @@ module.exports = (_ => { method = "get"; break; }; - BDFDB.LibraryRequires.request(`https://api.spotify.com/v1/me/player${type ? "/" + type : ""}?${Object.entries(Object.assign({device_id: device.id}, data)).map(n => `${n[0]}=${n[1]}`).join("&")}`, {method: method, headers: {authorization: `Bearer ${socket.accessToken}`}}, (error, response, result) => { + BDFDB.LibraryRequires.request(`https://api.spotify.com/v1/me/player${type ? "/" + type : ""}`, {method: method, form: Object.assign({device_id: device.id}, data), headers: {authorization: `Bearer ${socket.accessToken}`}}, (error, response, result) => { if (response && response.statusCode == 401) { BDFDB.LibraryModules.SpotifyUtils.getAccessToken(socket.accountId).then(promiseResult => { let newSocketDevice = BDFDB.LibraryStores.SpotifyStore.getActiveSocketAndDevice();