From 2744a2bdba97c89c3132d3ec22cd05895586b5f2 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Sat, 8 Jan 2022 10:18:50 +0100 Subject: [PATCH] Fixed language check --- deezer/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deezer/index.js b/deezer/index.js index 47c9cf3..a959886 100644 --- a/deezer/index.js +++ b/deezer/index.js @@ -105,7 +105,7 @@ class Deezer{ 'can_stream_hq': user_data.USER.OPTIONS.web_hq || user_data.USER.OPTIONS.mobile_hq, 'can_stream_lossless': user_data.USER.OPTIONS.web_lossless || user_data.USER.OPTIONS.mobile_lossless, 'country': user_data.USER.OPTIONS.license_country, - 'language': user_data.USER.SETTING.global.language, + 'language': user_data.USER.SETTING.global.language || "", 'loved_tracks': child.LOVEDTRACKS_ID }) } @@ -119,7 +119,7 @@ class Deezer{ 'can_stream_hq': user_data.USER.OPTIONS.web_hq || user_data.USER.OPTIONS.mobile_hq, 'can_stream_lossless': user_data.USER.OPTIONS.web_lossless || user_data.USER.OPTIONS.mobile_lossless, 'country': user_data.USER.OPTIONS.license_country, - 'language': user_data.USER.SETTING.global.language, + 'language': user_data.USER.SETTING.global.language || "", 'loved_tracks': user_data.USER.LOVEDTRACKS_ID }) } @@ -129,7 +129,7 @@ class Deezer{ if (this.childs.length-1 < child_n) child_n = 0 this.current_user = this.childs[child_n] this.selected_account = child_n - this.http_headers["Accept-Language"] = this.current_user.language.replace(/[^0-9A-Za-z *,-.;=]/g, '') + this.http_headers["Accept-Language"] = this.current_user.language.toString().replace(/[^0-9A-Za-z *,-.;=]/g, '') return [this.current_user, this.selected_account] }