As the title states - this little script produces a file with all your
servers tracks


Code:
--------------------
    
  $url = 'http://10.10.1.11:9000/jsonrpc.js';
  $command = 
"{`"id`":1,`"method`":`"slim.request`",`"params`":[null,[`"tracks`",`"0`",`"-1`",`"tags:egdJlsty`"]]}";
  $bytes = [System.Text.Encoding]::ASCII.GetBytes($command);
  $web = [System.Net.WebRequest]::Create($url);
  $web.Method = "POST";
  $web.ContentLength = $bytes.Length;
  #$web.ContentType="application/json";
  $stream = $web.GetRequestStream();
  $stream.Write($bytes,0,$bytes.Length);
  $stream.close();
  $reader = New-Object System.IO.Streamreader -ArgumentList 
$web.GetResponse().GetResponseStream();
  $json = $reader.ReadToEnd()|ConvertFrom-Json;
  $json.result.titles_loop | Out-File C:\lmstracks.json;
  $reader.Close();
  
--------------------



We can't stop here this is bat country. RIP Hunter S Thompson.
------------------------------------------------------------------------
pkfox's Profile: http://forums.slimdevices.com/member.php?userid=5346
View this thread: http://forums.slimdevices.com/showthread.php?t=105555

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

Reply via email to