Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -43,14 +43,13 @@ def extract_track_id_from_url(url):
|
|
43 |
def app():
|
44 |
|
45 |
# Step 1: User Authorization
|
46 |
-
if st.session_state.get('code') is None or '
|
47 |
auth_params = {
|
48 |
'client_id': CLIENT_ID,
|
49 |
'response_type': 'code',
|
50 |
'redirect_uri': REDIRECT_URI,
|
51 |
'scope': 'user-read-private', # Modify as per your required scopes
|
52 |
}
|
53 |
-
st.session_state['first_time_load'] = 1
|
54 |
st.write('Please log in to Spotify')
|
55 |
st.markdown(f"[Log In]({AUTH_URL}?{urlencode(auth_params)})", unsafe_allow_html=True)
|
56 |
else:#
|
|
|
43 |
def app():
|
44 |
|
45 |
# Step 1: User Authorization
|
46 |
+
if st.session_state.get('code') is None or (st.session_state['access_token'] is None):
|
47 |
auth_params = {
|
48 |
'client_id': CLIENT_ID,
|
49 |
'response_type': 'code',
|
50 |
'redirect_uri': REDIRECT_URI,
|
51 |
'scope': 'user-read-private', # Modify as per your required scopes
|
52 |
}
|
|
|
53 |
st.write('Please log in to Spotify')
|
54 |
st.markdown(f"[Log In]({AUTH_URL}?{urlencode(auth_params)})", unsafe_allow_html=True)
|
55 |
else:#
|