Sorry to necropost, but I'm trying to achieve the same thing: set the
mediadirs pref from outside lms.

After trying to piece together what's required by following Michael's
suggestion and looking at Slim::GUI::ControlPanel->setPref() and
Slim::GUI::ControlPanel->serverRequest()

..this string seem to be OK json:


Code:
--------------------
    
  echo 
'{"id":1,"method":"slim.request","params":["","pref","mediadirs",["/mnt/Media/Music"]]}'
 | jq
  {
  "id": 1,
  "method": "slim.request",
  "params": [
  "",
  "pref",
  "mediadirs",
  [
  "/mnt/Media/Music"
  ]
  ]
  }
--------------------


..but neither:

Code:
--------------------
    
  curl -d 
'{"id":1,"method":"slim.request","params":["","pref","mediadirs",["/mnt/Media/Music"]]}'
 -H "Content-Type: text/plain" -X POST http://localhost:9000/jsonrpc.js
  
--------------------

-- or --

Code:
--------------------
    
  curl -d 
'{"id":1,"method":"slim.request","params":["","pref","mediadirs",["%2Fmnt%2FMedia%2FMusic"]]}'
 -H "Content-Type: text/plain" -X POST http://localhost:9000/jsonrpc.js
--------------------

..do anything.

Obviously, I'm missing a step here.  Help, anyone?


------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=96666

_______________________________________________
Squeezecenter mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/squeezecenter

Reply via email to