v14 Playlist.Remove returns Invalid params - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174) +---- Thread: v14 Playlist.Remove returns Invalid params (/showthread.php?tid=236016) |
Playlist.Remove returns Invalid params - jason.king1311 - 2015-08-20 Hi, I am posting the following JSON to the server however I'm receiving an invalid params response. Any idea why? Code: { I have confirmed that there are items in the playlist. RE: Playlist.Remove returns Invalid params - Montellese - 2015-08-20 Wrong playlistid? RE: Playlist.Remove returns Invalid params - jason.king1311 - 2015-08-20 I thought that may be the case, however I called Playlist.GetItems just before and passed in the same playlistid and it returned the items in that playlist. Re: RE: Playlist.Remove returns Invalid params - Milhouse - 2015-08-20 (2015-08-20, 10:06)jason.king1311 Wrote: I thought that may be the case, however I called Playlist.GetItems just before and passed in the same playlistid and it returned the items in that playlist. Are you confusing id with playlistid in your query, why have you specified a value of 365 for id, is this the playlistid value returned by Playlist.GetItems? RE: Playlist.Remove returns Invalid params - Montellese - 2015-08-20 playlistid can only be 0, 1 or 2 right now so that's correct. That id is the request id used to map a response to a request previously made. RE: Playlist.Remove returns Invalid params - racht - 2018-01-05 Remove and it will work like charm! RE: Playlist.Remove returns Invalid params - eutervogel - 2022-11-28 Code:
It seems to me that Kodi has problems handling zero. If I send this request, everything is fine, even though there is only one item in the plalist:
Answer:
If I send the exact same request, but with
I get invalid params. What is going on here? Thanks in advance RE: Playlist.Remove returns Invalid params - eutervogel - 2022-11-28 UPDATE: I just realized, that I can't remove the current playing item from the list (or is there a way?). Now I just remove index 0 after Player.OnStop event. That works for me. |