From c42b8131d16b513033dcaf2355dd5f2a352d2d15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Mon, 22 Nov 2021 14:33:10 +0100 Subject: [PATCH] Fix credentials.json not being saved in CREDENTIALS_LOCATION path --- zspotify/zspotify.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zspotify/zspotify.py b/zspotify/zspotify.py index 51ef6c6..4e91842 100644 --- a/zspotify/zspotify.py +++ b/zspotify/zspotify.py @@ -49,7 +49,8 @@ class ZSpotify: user_name = input('Username: ') password = getpass() try: - cls.SESSION = Session.Builder().user_pass(user_name, password).create() + conf = Session.Configuration.Builder().set_stored_credential_file(cred_location).build() + cls.SESSION = Session.Builder(conf).user_pass(user_name, password).create() return except RuntimeError: pass