I am trying to remove the currently playing song from the queue and playlist. Everything seems to be working great, however the removeFromPlaylist does not actually remove the song from the playlist. I can even add the song to another playlist. I get the feedback in Volumuio UI that shows the song was deleted, however if is not removed from the playlist. Any ideas???
Here is my code:
#deleteFromPlaylist.py
import requests
from socketIO_client import SocketIO
sio = SocketIO('localhost', 3000)
playlist = "DMTest"
state=requests.get("http://localhost:3000/api/v1/getState", timeout=1.0).json()
N = state.get("position")
U = state.get("uri")
sio.emit("removeFromPlaylist", {"name":playlist,"uri":U}) #DOES NOT WORK
print (U)
sio.emit("removeFromQueue", {"value": N}) #WORKS
sio.emit("next")
sio.emit("addToPlaylist",{"name":"Test","service":"mpd","uri":U}) #WORKS
sio.disconnect()