From de941f2cda9b24c0c7d0a3cd2a329b079c03cd90 Mon Sep 17 00:00:00 2001 From: zeph Date: Sat, 13 Aug 2022 06:22:45 -0400 Subject: [PATCH] update logging to be easily divisable --- spotify.html | 3 ++- static/js/spotify_widget.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/spotify.html b/spotify.html index 89aee31..c0bdaa2 100644 --- a/spotify.html +++ b/spotify.html @@ -16,7 +16,7 @@
-

+

@@ -28,5 +28,6 @@ \ No newline at end of file diff --git a/static/js/spotify_widget.js b/static/js/spotify_widget.js index 4d83a33..eeb12b8 100644 --- a/static/js/spotify_widget.js +++ b/static/js/spotify_widget.js @@ -6,9 +6,10 @@ var image = div.querySelector("#cover-img"); var text = div.querySelector("#cover-text"); var content = div.querySelector(".cover-text"); -console.log("[ws] asked server to initiate connection..") +console.log("[ws-iframe] asked server to initiate connection..") socket.emit("spotify_status", "listen"); socket.on("api_update", (song_data) => { +console.log(song_data) if (!song_data.position) { image.src = "https://thatalex.dev/static/bad.png" text.innerHTML = "Uh oh!
There isn't an active song.
Try again later." @@ -20,7 +21,7 @@ socket.on("api_update", (song_data) => { // on connect + error events socket.on("connect", () => { - console.log('[ws] hello dear friend! connected successfully to backend, formatting page') + console.log('[ws-iframe] hello dear friend! connected successfully to backend, formatting page') }) socket.on("error", (e) => {