This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"""One-time Spotify login per account, to get the refresh token config.py
|
||||
needs for that account's Spotify button on the panel.
|
||||
|
||||
python3 tools/spotify_auth.py --client-id ... --client-secret ... --account fifou
|
||||
python3 tools/spotify_auth.py --client-id ... --client-secret ... --account 1
|
||||
|
||||
Run this somewhere you can actually reach a browser to approve the
|
||||
login -- your laptop, or a WSL shell if Windows can reach it (WSL2
|
||||
@@ -126,7 +126,7 @@ def main():
|
||||
parser.add_argument("--client-id", required=True)
|
||||
parser.add_argument("--client-secret", required=True)
|
||||
parser.add_argument("--account", required=True,
|
||||
help="the SPOTIFY_ACCOUNTS key this login is for, e.g. fifou or clarita")
|
||||
help="which SPOTIFY_ACCOUNTS slot this login is for, e.g. 1 or 2")
|
||||
args = parser.parse_args()
|
||||
|
||||
state = secrets.token_urlsafe(16)
|
||||
@@ -136,7 +136,7 @@ def main():
|
||||
print("\nPut these in .env -- the client id and secret are the same for every account:\n")
|
||||
print(f"SPOTIFY_CLIENT_ID={args.client_id}")
|
||||
print(f"SPOTIFY_CLIENT_SECRET={args.client_secret}")
|
||||
print(f"SPOTIFY_{args.account.upper()}_REFRESH_TOKEN={tokens['refresh_token']}")
|
||||
print(f"SPOTIFY_ACCOUNT{args.account}_REFRESH_TOKEN={tokens['refresh_token']}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user