RPC issues after upgrade

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

Is Mopidy-tunein installed? Does it appear in the output of Mopidy deps? Tunein http urls are not radio streams so Mopidy-Stream can’t play them. And mopidy-tunein only understands ‘tunein:’ uris, not ‘http:’ uris.

Also, uris param wants a list of uris but you gave just a string.

I checked mopidy deps and it shows Mopidy-tunein as being installed.

Do I need to do something different to supply a list of 1?

As I was working on it today, I realized I may need to update mopidy-min.js, but I can’t find the new version. I saw the comments that it is no longer bundled, and I think I need to use mopidy.js from the mopidy/mopidy.js git repo instead, but I am getting errors on the require statements. Is node.js required now?

Thanks!

Jeff

Yes. Pass a list using square brackets:

mopidy.tracklist.add({uris:[“tunein:station:s2741”]})

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