clangen / musikcube

a cross-platform, terminal-based music player, audio engine, metadata indexer, and server in c++
https://musikcube.com
BSD 3-Clause "New" or "Revised" License
4.08k stars 295 forks source link

Error in API documentation query_category #653

Open ScuttleSE opened 6 months ago

ScuttleSE commented 6 months ago

This is the example code for the query_category API function

{
    "name": "query_category",
    "type": "request",
    "id": "<unique_id>",
    "device_id": "<unique_device_id>",
    "options": {
        "category": "<album | artist | album_artist | genre | playlist>",
        "filter": "<filter string>", /* optional */
        "predicates": [ /* optional */
            {
                "category": "<album | artist | album_artist | genre | etc>",
                "id": <int64>
            },
            ...
        ]
    }
}

If you are querying for playlists, the category must be playlists, not playlist

{
    "name": "query_category",
    "type": "request",
    "id": "<unique_id>",
    "device_id": "<unique_device_id>",
    "options": {
        "category": "<album | artist | album_artist | genre | playlists>",
        "filter": "<filter string>", /* optional */
        "predicates": [ /* optional */
            {
                "category": "<album | artist | album_artist | genre | etc>",
                "id": <int64>
            },
            ...
        ]
    }
}