Got an issue with filter on GetMovies
#1
Hi,

I've trying to filer my movie listing by genreid but i'm getting this JSON returned:

Code:
{"error":{"code":-32602,"data":{"method":"VideoLibrary.GetMovies","stack":{"message":"Received value does not match any of the union type definitions","name":"filter","property":{"name":"order","type":"string"},"type":"object"}},"message":"Invalid params."},"id":1,"jsonrpc":"2.0"}

The JSON I'm posting looks like this:
Code:
{"jsonrpc":"2.0","method":"VideoLibrary.GetMovies","params":{"limits":{"start":0,"end":20},"filter":{"field":"genreid","operator":"is","value":1},"properties":["art","rating","genre","imdbnumber","plot","file","showlink","tag","trailer","year","streamdetails"],"sort":{"order":"descending","method":"dateadded","ignorearticle":true}},"id":1}

I've looked through so many KODI pages to try work out what i'm doing wrong, but I can't seem to work it out, I'm sure it's something simple if someone could help me out that would be great
Reply
#2
There's something wrong with the error message. The
Code:
"property":{"name":"order","type":"string"
is wrong. But the request is wrong as well.

Either you need to specify the filter as
Code:
"filter": { "genreid": 1 }
(which can't be combined with other filters) or you need to use the genre name instead of its ID i.e.
Code:
"filter": { "field": "genreid", "operator": "is", "value": 1 }
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
Thanks for your help I was very confused by the error.

I'll do the first example you suggested and report back
Reply

Logout Mark Read Team Forum Stats Members Help
Got an issue with filter on GetMovies0