Merge pull request #200 from Mikescher/master-pr-004

Fix --credentials-location
This commit is contained in:
Logykk 2021-11-24 20:14:09 +13:00 committed by GitHub
commit 7a6e3dffa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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