Skip to content

Commit 2bd302c

Browse files
committed
- attempt at fixing spotify music quiz
1 parent 85a240c commit 2bd302c

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

tools/spotify_music_quiz_cards.html

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,11 @@ <h2 class="text-xl font-bold mb-4 text-black dark:text-white">
172172

173173
window.onSpotifyWebPlaybackSDKReady = () => {
174174
const token = localStorage.getItem('spotify_access_token') || getHashParams().access_token;
175-
if (token) initializePlayer(token);
175+
if (token) {
176+
initializePlayer(token);
177+
} else {
178+
startAuth();
179+
}
176180
};
177181

178182
function startAuth() {
@@ -254,13 +258,6 @@ <h3 class="text-lg font-semibold">${track.name}</h3>
254258
});
255259
document.getElementById('createQRButton').onclick = showPlaylistModal;
256260
updateButtonIcon();
257-
258-
const token = localStorage.getItem('spotify_access_token') || getHashParams().access_token;
259-
if (token) {
260-
initializePlayer(token);
261-
} else {
262-
startAuth();
263-
}
264261
});
265262

266263
async function processPlaylist() {

0 commit comments

Comments
 (0)