Sockets allowing for live updates rather than complete rebuilds #7

Merged
kristy-fournier merged 20 commits from timerChanges into main 2026-02-11 09:39:36 -05:00
2 changed files with 6 additions and 3 deletions
Showing only changes of commit 4cd5b33f84 - Show all commits

View file

@ -67,9 +67,9 @@ async function getFromServer(bodyInfo, source="", secure=false, password=adminPa
// im suprised i didn't comment on this already but this is kinda lame desing // im suprised i didn't comment on this already but this is kinda lame desing
// its not wrong but you know // its not wrong but you know
// it is easy which i like // it is easy which i like
// and it overrides any other non-async alerts which is nice
alertText("Error: Admin restricted action") alertText("Error: Admin restricted action")
} else if(!response.ok){ } else if(!response.ok){
throw new Error(data.error);
alertText("Error: "+data.error); alertText("Error: "+data.error);
} }
// we add some information from the response just in case it is needed // we add some information from the response just in case it is needed
@ -508,7 +508,7 @@ async function generateVisualPlaylist(conditions="") {
async function submitSong(songid) { async function submitSong(songid) {
let returncode = await getFromServer({song: songid}, "songadd"); let returncode = await getFromServer({song: songid}, "songadd");
if(returncode == ERR_NO_ADMIN) { if(returncode["status"] === ERR_NO_ADMIN) {
// right now the error is alerted in getFromServer, maybe will change that // right now the error is alerted in getFromServer, maybe will change that
} else if(returncode["status"]!==200) { } else if(returncode["status"]!==200) {
alertText("That song's already in the queue! Hang on!") alertText("That song's already in the queue! Hang on!")

View file

@ -60,7 +60,6 @@ These are specific details on each section of the app, and how to use them
- Accepts Play-Pause and Skip commands - Accepts Play-Pause and Skip commands
- Uses port 19054 by default - Uses port 19054 by default
- Can be changed in the `.env` file - Can be changed in the `.env` file
- The default port can be changed in the file
- Running with `--admin (admin password)` sets an admin password for moderation on the client - Running with `--admin (admin password)` sets an admin password for moderation on the client
- ***Note: Do not reuse a password, the password is hashed before being sent over the network, but I still wouldn't bet my house on it, no security is guaranteed*** - ***Note: Do not reuse a password, the password is hashed before being sent over the network, but I still wouldn't bet my house on it, no security is guaranteed***
- Anyone who knows the admin password can enter it on the client and change the abilities of any non-admin users (for example to limit skipping) - Anyone who knows the admin password can enter it on the client and change the abilities of any non-admin users (for example to limit skipping)
@ -70,6 +69,9 @@ These are specific details on each section of the app, and how to use them
- Add track to queue - Add track to queue
- Partymode toggle - Partymode toggle
- Change volume - Change volume
- Add duplicate track to queue
- This is a seperate toggle, but is based on the setting "Add track to queue"
- Basically if you can't add at all, you can't add a duplicate either (obviously)
- When this argument is left out a random string is generated and printed in console to be the admin password (so keep the console window hidden if you don't want to use it) - When this argument is left out a random string is generated and printed in console to be the admin password (so keep the console window hidden if you don't want to use it)
### Client: ### Client:
@ -89,6 +91,7 @@ From left to right:
- Volume controls the VLC volume of the connected server - Volume controls the VLC volume of the connected server
- *Because the volume can be controlled in the client, for best usage set your device volume as high as possible and turn it down using this slider* - *Because the volume can be controlled in the client, for best usage set your device volume as high as possible and turn it down using this slider*
- QR code to allow others to connect to and use the Remote - QR code to allow others to connect to and use the Remote
- Admin password can be set to restrict actions for general users, or avoid the set restrictions
### A quick note on the password feature ### A quick note on the password feature