Mopidy Discourse

Add playlists with core API JSON-RPC

I am using core API to manage my mopidy server through NodeRed, but I have noted that I can’t add playlists with uris starting with “m3u”.

This command works:
{"jsonrpc": "2.0", "id": 1, "method": "core.tracklist.add", "params": {"uris":"spotify:playlist:7gyIPHbKqrNNnMCWjp2cbt","spotify:playlist:8gyIPHbKqrNNnMCWht7tsd"}}

But this one doesn’t:
{"jsonrpc": "2.0", "id": 1, "method": "core.tracklist.add", "params": {"uris":"m3u:random.m3u8","m3u:Kitty%20Margolis%20Playlist.m3u8"}}

I got the uris from the command:
{"jsonrpc": "2.0", "id": 1, "method": "core.playlists.as_list"}

First get the items from the playlist(s). Then add those track ref uris to the tracklist. That method should work for all backends.

The shortcut method you tried works for only some backends.

So I need a function to loop through items before adding them?

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