From 734894d8b212ca77894ee76a4e64f88f9a9a07d0 Mon Sep 17 00:00:00 2001 From: Phil Tsaryk Date: Tue, 10 Sep 2024 20:59:23 +0200 Subject: [PATCH] feat(spotify): add Accept-Language header to API requests --- spotify/index.js | 1 + spotify/package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/spotify/index.js b/spotify/index.js index e46b8dfb8..cfbaf8326 100644 --- a/spotify/index.js +++ b/spotify/index.js @@ -987,6 +987,7 @@ ControllerSpotify.prototype.spotifyApiConnect = function () { var d = new Date(); self.spotifyApi = new SpotifyWebApi(); + self.spotifyApi.setDefaultHeaders({'Accept-Language': self.commandRouter.sharedVars.get('language_code')}); // Retrieve an access token self.spotifyClientCredentialsGrant() diff --git a/spotify/package.json b/spotify/package.json index 93ab1b58b..c0c3731aa 100755 --- a/spotify/package.json +++ b/spotify/package.json @@ -32,7 +32,7 @@ "kew": "^0.7.0", "node-cache": "^4.1.1", "socket.io-client": "2.1.1", - "spotify-web-api-node": "^5.0.2", + "spotify-web-api-node": "volumio/spotify-web-api-node#caf4921d71a3b67badfa25a1f2d5b36aa55e32a4", "superagent": "^8.1.2", "v-conf": "^1.4.2", "ws": "^8.13.0"