I created an m3u file which contains only this one line:
/home/pi/01_track.mp3
When I started mopidy I get this message(s):
Loaded 1 M3U playlists from /home/pi/.local/share/mopidy/m3u
So mopidy recognize my m3u playlist but when I would like to play this track I post this json:
{“method”:“core.tracklist.add”,“jsonrpc”:“2.0”,“id”:111,“params”:{“uri”:“file:///home/pi/01_track.mp3”}}
I get the track uri from playlist object, and the response is:
{“id”:111,“jsonrpc”:“2.0”,“result”:}
What am I doing wrong? Should I do something more to use the m3u playlist? Any guess?
Another way how I tested my m3u playlist:
I tested with a webclient, I able to add the track to the tracklist via this webclient but when I would like to play this song the server log said:
WARNING Track is not playable: file:///home/pi/01_track.mp3
INFO Loaded 1 M3U playlists from /home/jodal/.local/share/mopidy/m3u
Then I load and play the playlist with the mpc client:
$ mpc clear
volume:100% repeat: off random: off single: off consume: off
$ mpc load foo
loading: foo
$ mpc playlist
file:///home/jodal/blank.mp3
$ mpc play; sleep 1; mpc status; sleep 5; mpc status
file:///home/jodal/blank.mp3
[playing] #1/1 0:04/0:00 (0%)
volume:100% repeat: off random: off single: off consume: off
# sleep 1 goes here
file:///home/jodal/blank.mp3
[playing] #1/1 0:01/0:00 (0%)
volume:100% repeat: off random: off single: off consume: off
# sleep 5 goes here
volume:100% repeat: off random: off single: off consume: off
$
Note that the local backend only plays local:... URIs. To play file:// URIs, you must leave the stream backend enabled.
OK. Sorry but I didnt know that I have to enabled the stream backend. So now it works from a web client.
But my main problem is that I cant add the track to the playlist with HTTP-JSON message.