From 0099f17d3463b5654abe877fc02237fb2fb29c4b Mon Sep 17 00:00:00 2001 From: Kristy Fournier <124598538+kristy-fournier@users.noreply.github.com> Date: Sun, 8 Mar 2026 13:27:17 -0400 Subject: [PATCH] update the total song length from the socket messages --- Server/static/scripts.js | 3 ++- Server/webbyBits.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Server/static/scripts.js b/Server/static/scripts.js index 2c441b9..6871635 100644 --- a/Server/static/scripts.js +++ b/Server/static/scripts.js @@ -664,7 +664,8 @@ socket.on("timeUpdate", function(data) { // console.log("recieved data from timeUpdate"); // console.log(data); playlistElapsedSeconds = data["elapsedTime"]; - currentlyPlaying = data["playingState"] + currentlyPlaying = data["playingState"]; + playlistSongLength = data["songLength"] }); socket.on("skipSong",() => { diff --git a/Server/webbyBits.py b/Server/webbyBits.py index 0b0ae9c..710180e 100644 --- a/Server/webbyBits.py +++ b/Server/webbyBits.py @@ -102,7 +102,7 @@ def playQueuedSongs(): counter+=1 if(counter > 2): playingState = str(player.get_state()) == "State.Playing" - socketio.emit('timeUpdate',{"elapsedTime":player.get_time()/1000,"playingState":playingState}) + socketio.emit('timeUpdate',{"elapsedTime":player.get_time()/1000,"playingState":playingState,"songLength":player.get_length()/1000}) counter = 0 playerState = str(player.get_state()) endStates = ["State.Ended","State.Stopped","State.NothingSpecial"]