Problems filtering for titles in GetAlbums
#1
Hello everybody,


I am a newbie to Kodi, so pardon me if my question is dump:

I am writing a client for an android tablet to search my music library. Kodi is running on an raspberry and obviously I am coding in Java.
I have troubles when searching for a title of a album. Probably I am doing something dumb here, so I hope you can give me an example

I try to execute the following request:

{"jsonrpc": "2.0", "method": "AudioLibrary.GetAlbums", "params": {"properties": ["artist", "title"], "filter": {"field": "title", "operator": "contains", "value": "wish"}, "sort": { "order": "ascending", "method": "album", "ignorearticle": true } }, "id": "libAlbums"}

However when I try to execute this request I get the answer: "Received value does not match any of the union type definitions"

If I try to filter for an artist:

{"jsonrpc": "2.0", "method": "AudioLibrary.GetAlbums", "params": {"properties": ["artist", "title"], "filter": {"field": "artist", "operator": "contains", "value": "purple"}, "sort": { "order": "ascending", "method": "album", "ignorearticle": true } }, "id": "libAlbums"}

everything works great, I get a list of all albums of Deep Purple. The only change here is that I use the field "artist" instead of "title". I also have tried the field "label", which does not work either. However, when I use the field "album" everything works as expected, so I can use the field "album" as a "workaround", but I am not sure if that's the way it is supposed to be.

Is this a bug or a feature?


Thanks for your answers,


Rudi
Reply
#2
"album" is the correct field to use. And yes it's not exactly in line with how it works for video library items where "title" is always a valid field.
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 confirmation.

Rudi
Reply

Logout Mark Read Team Forum Stats Members Help
Problems filtering for titles in GetAlbums0