2020-04-02, 19:37
(2020-04-02, 12:53)feredy2011 Wrote: before (in past version) i use 3 command for play folder of felash.
With thos3 commands you created a playlist and then you are playing that playlist. You can still use the same commands. Just use them with Curl instead of the web browser.
you simply have to know how to read those %-thingies:
%22 = "
%3A = :
%7B = {
%7D = }
%20 = whitespace
https://www.urldecoder.org/ helps as well. That will show how it's written in clear text and then you can replace the section after the --data
for example clearing your playlist has the --data section:
{"jsonrpc":"2.0","method":"Playlist.Clear","params":{"playlistid":0},"id":1}
The playlist ID might have to change. So you have to check for that first probably.
(2020-04-02, 12:53)feredy2011 Wrote: also i test your command for flash memory but dont work .I just tested that same commend with a mp3 on a folder on my LibreELEC machine and it worked well. So I guess the path is wrong. I can't tell because you missed to post the error message which should come up then. If the path is wrong, then simply check the correct path again.
You could also get me the output of the "mount" command after you have plugged in your USB stick. That might show more which path it is.
(2020-04-02, 12:53)feredy2011 Wrote: but repeat command(one - all - off - random) is not there.I'm not your personal google I already linked you to the schema and by searching you could have found:
Player.SetRepeat and Player.SetShuffle as methods
You will need the playerID as well for those
For the player.open and a directory, I would suggest to use "directory" as an item and then the path to the directory.
curl -s -X POST http://192.168.1.162:8080/jsonrpc -H 'Content-Type: application/json' --data '{"jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "directory": "/storage/music/" } }, "id":1}'
Also, please do me a favour. I highly guess you have the webinterface running. PLease enter that by entering the IP of your Pi in a browser followed by the Port you have set up for it. I guess in your case it should be: http://192.168.1.199:80
If the webinterface opens, you have a menu symbol on the bottom right. Click on that, then hit "The lab" and then select "Api browser". Then you will see all available methods. Play around a bit and see how far you will get. I explained most of the stuff already in this thread.