v14 Playlist.Remove returns Invalid params
#1
Hi,

I am posting the following JSON to the server however I'm receiving an invalid params response. Any idea why?

Code:
{
  "id": 365,
  "jsonrpc": "2.0",
  "method": "Playlist.Remove",
  "params": {
    "playlistid": 1,
    "position": 0
  }
}

I have confirmed that there are items in the playlist.
Reply
#2
Wrong playlistid?
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
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.
Reply
#4
(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?
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#5
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.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#6
Remove
python:
id=365
and it will work like charm!
Reply
#7
Code:
Hi, and sorry for reopening such an old thread. I'm experiencing the same thing.

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:
json:
{"jsonrpc":"2.0","method":"Playlist.Remove","params":{"playlistid":1,"position":1},"id":1}

Answer:
json:
{"jsonrpc":"2.0","method":"Playlist.OnRemove","params":{"data":{"playlistid":1,"position":1},"sender":"xbmc"}}

If I send the exact same request, but with 
json:
"position": 0

I get invalid params.

What is going on here?

Thanks in advance
Reply
#8
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.
Reply

Logout Mark Read Team Forum Stats Members Help
Playlist.Remove returns Invalid params0