Added a "clear playlist" admin function on the client
This commit is contained in:
parent
6a04ac30f5
commit
1e1eac4aa4
3 changed files with 28 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue