Added a "clear playlist" admin function on the client

This commit is contained in:
Kristy Fournier 2026-01-22 00:10:59 -05:00
parent 6a04ac30f5
commit 1e1eac4aa4
3 changed files with 28 additions and 2 deletions

View file

@ -117,6 +117,13 @@ def playerControls():
return "200"
else:
return ERR_NO_ADMIN
elif recieveData["control"] == "clear":
if ADMIN_PASS == recieveData['password']: # this is only ever allowed with the adminpassword
with playlistLock:
playlist.clear()
return "200"
else:
return ERR_NO_ADMIN
else:
return "400"
else: