Playlist Refresh


I would like to automatically refresh a playlist, which is also automatically generated when mounting at /media/usb/.

I run this script to produce the playlist:
find /media/usb/ -name "*.mp3" -printf "%p\n" > /home/pi/mopidy/playlists/USB_Stick.m3u
curl -X POST -H Content-Type:application/json -d ' {"jsonrpc": "2.0", "id": 1, "method": "core.playlists.refresh"}' http://raspberrypi.local:6680/mopidy/rpc

The playlist apears in the WebClient. But all mp3 files couldn’t be played with the Client.
I get the error in service mopidy status:
Dec 08 10:53:22 raspberrypi mopidy[477]: ERROR WebSocket request error: Expected album to be a <class 'mopidy.models.Album'>, not {u'uri': u'x', u'name': u''}

I read about the bug report issue 121 and run Mopidy 1.1.1 (the latest version if I am right) but the playlist doesn’t plays.

Is there a failure of mine or is it still a bug?


Just in this moment I thought about the permissions. The /media/usb is owned by root. Could this be a problem too, because I am running mopidy as a service and i think this is user mopidy.

edit: lrwxrwxrwx 1 root root 4 Dec 7 21:54 /media/usb -> usb0 seems not to be the problem

Sounds like The fix isn’t completed but it’s due in the next webclient version