Problem getting songs by album id
#1
Hi,
Having problem getting all songs filtered by album id

I've found that I can filter with the name of the album :
Code:
http://xbmc:[email protected]:2223/jsonrpc?request={"jsonrpc": "2.0", "method": "AudioLibrary.GetSongs", "params": { "limits": { "start" : 0, "end": 25 }, "properties": [ "artist", "duration", "album", "track" ],"filter": {"field": "album", "operator": "is", "value": "Rihana"}, "sort": { "order": "ascending", "method": "track", "ignorearticle": true } }, "id": "libSongs"}

Is there anyway to filter by albumid?
Tried the following:

Code:
http://xbmc:[email protected]:2223/jsonrpc?request={"jsonrpc": "2.0", "method": "AudioLibrary.GetSongs", "params": { "properties": [ "albumid","artist", "duration", "album", "track" ],"filter": {"field": "albumid", "operator": "is", "value": "1"} }, "id": "libSongs"}

and got result:
Code:
{
    "error": {
        "code": -32602,
        "data": {
            "method": "AudioLibrary.GetSongs",
            "stack": {
                "message": "Received value does not match any of the union type definitions",
                "name": "filter",
                "property": {
                    "type": "string"
                },
                "type": "object"
            }
        },
        "message": "Invalid params."
    },
    "id": "libSongs",
    "jsonrpc": "2.0"
}


Thanks very much
Reply
#2
Code:
{"jsonrpc": "2.0", "method": "AudioLibrary.GetSongs", "params": { "properties": [ "albumid","artist", "duration", "album", "track" ],"filter": { "albumid": 1 } }, "id": "libSongs"}
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, can you give me a brief explanation when to use this or with operator?
Reply
#4
It's all specified in the JSON-RPC API definition. In general most ID based parameters work like the above example whereas most other filters work with the operator etc.
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
#5
Thanks
Reply

Logout Mark Read Team Forum Stats Members Help
Problem getting songs by album id0