LibraryController.search

I am wondering if it’s possible to use the core method LibraryController.search to search for tracks in tunein. I have tried with this:

curl -d '{"jsonrpc":"2.0","id":1,"method":"core.library.search","params":{"query":{"artist":"Manu Chao"}, "uris":["tunein:"]}}' -H 'Content-Type: application/json' http://localhost:6680/mopidy/rpc

but it just returns:

{"jsonrpc": "2.0", "id": 1, "result": [{"__model__": "SearchResult", "uri": "tunein:search"}]}

Search is supported, I hope the readme stated this already. But I don’t think it supports anything except basic ‘any’ searches. Did you try that?

If I use ‘any’:

curl -d '{"jsonrpc":"2.0","id":1,"method":"core.library.search","params":{"query":{"artist":"Manu Chao"}, "uris":["any"]}}' -H 'Content-Type: application/json' http://localhost:6680/mopidy/rpc

it doesn’t work, giving this error:

mopidy.exceptions.ValidationError: Expected a list of URIs, not 'any'

but it works if, instead of ‘any’, I put ‘tidal:’. But I was in the need to search in tunein,

Any is a field value. See the docs mopidy.core — Core API — Mopidy 3.3.0 documentation

Yes, of course. Sorry, my mistake.
Anyway, this line works:

curl -d '{"jsonrpc":"2.0","id":1,"method":"core.library.search","params":{"query":{"any":"Manu Chao"}, "uris":["tunein:"]}}' -H 'Content-Type: application/json' http://localhost:6680/mopidy/rpc

the only issue is that I cannot limit the search to “Artist” or “album”.
I can live with that. Thanks

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.