09-19-2024, 03:16 PM
(09-19-2024, 01:22 PM)LeGuiz Wrote: here
curl -G "http://moode.local/command/index.php" -d "cmd=set_volume+up+2"
Per the Setup Guide the command is -up or -dn
https://github.com/moode-player/docs/blo...set_volume
In any case I can repro that the curl command does not work and it appears that calling the index.php script in this way does not allow the PHP session to be opened which is required for a couple of the commands including set_volume.
Here's an example. The get_output_format command requires access to the PHP session but the cookie being sent by curl is not the correct session cookie. It should be ho7vk67sqrjua8sme0pqhsjgdq
Code:
pi@moode9:~ $ curl -G -S -s -I --data-urlencode "cmd=get_output_format" http://trx/command/
HTTP/1.1 200 OK
Server: nginx/1.22.1
Date: Thu, 19 Sep 2024 15:08:54 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Set-Cookie: PHPSESSID=hi483a4ilmj3t39q8qa29op9ju; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache