I stop using Mopidy for a while and recently wanted to start it up again so I did a fresh install (latest version), but am hitting some issues. I am using the JSON-RPC API from a web page to play music on the server. I was using the tracklist controller add, and I see in the Changelog that the uri parm is replaced by uris, but it complains that anything I pass is “not a URI”.
old: mopidy.tracklist.add({“tracks”:null,“at_position”:null,“uri”:urlText,“uris”:null})
new: mopidy.tracklist.add({uris:urlText})
urlText was an http:// address of an mp3, m3u, etc. Mopidy figured out the backend to use.
I’ve tried TuneIn stations as both URLs and Mopidy URIs, but neither work now:
“http://opml.radiotime.com/Tune.ashx?id=s27410” or “tunein:station:s27410”
How do I need to change the format of the URL into an acceptable URI?
The exact error is:
mopidy.tracklist.add({uris:“http://opml.radiotime.com/Tune.ashx?id=s27410”})
data: {type: ‘ValidationError’, message: “Expected a list of URIs, not ‘http:__opml.radiotime.com/Tune.ashx?id=s27410’”, traceback: Traceback (most recent call last):\n File "/usr/li… 'http:__opml.radiotime.com/Tune.ashx?id=s27410'\n
}
message: “Application error”
(replaced // with __ to limit the number of links)
Also, I can’t get the API Explorer to install. I’ve used the auto-complete in the browser console as recommended in the docs, but I still liked the API Explorer interface. Any recommendations? Not sure what log it is referencing…
python3 -m pip install Mopidy-API-Explorer
Results in a long list of errors, ending with:
TypeError: cannot use a string pattern on a bytes-like object
Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Thanks!
Jeff