Home of the Squeezebox™ & Transporter® network music players.
Page 577 of 712 FirstFirst ... 77477527567575576577578579587627677 ... LastLast
Results 5,761 to 5,770 of 7113
  1. #5761
    Senior Member
    Join Date
    Jan 2010
    Posts
    751
    Quote Originally Posted by staresy View Post
    I think there is some sort of syntax difference for commands when running curl under windows, typing the command exactly as is returns:

    curl: (1) Protocol "'http" not supported or disabled in libcurl

    A tiny bit of research hints that single quotes (') don't work for curl under Windows, they must be double (")

    So wrapping the 'http://localhost:9000/jsonrpc.js' as "http://localhost:9000/jsonrpc.js" gets past the curl: (1) error, but reports the curl: (52) error, so I assume there must be some other syntax changes required to run this command on windows. Hmm, it's never straightforward!
    Passing a JSON string on the command line under Windows would require to escape the double quotes, like this:
    Code:
    curl "http://localhost:9000/jsonrpc.js" --data-raw "{\"id\":0,\"method\":\"slim.request\",\"params\":[\"\",[\"musicartistinfo\",\"localfiles\",\"folder:/C:/Google Drive/Music/Bob Pearce/Someone To Run To/\"]]}"

  2. #5762
    Senior Member
    Join Date
    Jun 2005
    Location
    The South, UK
    Posts
    294
    Quote Originally Posted by reinholdk View Post
    Passing a JSON string on the command line under Windows would require to escape the double quotes, like this:
    Code:
    curl "http://localhost:9000/jsonrpc.js" --data-raw "{\"id\":0,\"method\":\"slim.request\",\"params\":[\"\",[\"musicartistinfo\",\"localfiles\",\"folder:/C:/Google Drive/Music/Bob Pearce/Someone To Run To/\"]]}"
    Thanks, yes that worked, at least now we know the windows syntax.

    The response was as per that from the console window:

    C:\WINDOWS\system32>curl "http://192.168.1.24:9000/jsonrpc.js" --data-raw "{"id":0,"method":"slim.request","params":["",["musicartistinfo","localfiles","folder:/C:/Google Drive/Music/Bob Pearce/Someone To Run To/"]]}"
    {"params":["",["musicartistinfo","localfiles","folder:/C:/Google Drive/Music/Bob Pearce/Someone To Run To/"]],"method":"slim.request","id":0,"result":{"window" :{"textArea":"Empty"},"count":1,"offset":0}}
    C:\WINDOWS\system32>
    Location 1: LMS 8.2 on Win 10 Brix Server, x2 SB Radios, x1 Touch, x1 Controller : Location 2: LMS 8.0 on Win 10 Brix Server, x2 SB Radios, x1 Duet Receiver, x1 Controller : Alexa Mediaserver Smart Skill, Material Android, SqueezeliteX control

  3. #5763
    Senior Member
    Join Date
    Mar 2017
    Posts
    2,738
    Quote Originally Posted by staresy View Post
    Thanks, yes that worked, at least now we know the windows syntax.

    The response was as per that from the console window:

    C:\WINDOWS\system32>curl "http://192.168.1.24:9000/jsonrpc.js" --data-raw "{"id":0,"method":"slim.request","params":["",["musicartistinfo","localfiles","folder:/C:/Google Drive/Music/Bob Pearce/Someone To Run To/"]]}"
    {"params":["",["musicartistinfo","localfiles","folder:/C:/Google Drive/Music/Bob Pearce/Someone To Run To/"]],"method":"slim.request","id":0,"result":{"window" :{"textArea":"Empty"},"count":1,"offset":0}}
    C:\WINDOWS\system32>
    So, now try with "C:/...." and not "/C:/..." - i.e. remove the leading slash.
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

  4. #5764
    Senior Member
    Join Date
    Jun 2005
    Location
    The South, UK
    Posts
    294
    Quote Originally Posted by cpd73 View Post
    So, now try with "C:/...." and not "/C:/..." - i.e. remove the leading slash.
    That seems to have returned something....

    C:\WINDOWS\system32>curl "http://192.168.1.24:9000/jsonrpc.js" --data-raw "{"id":0,"method":"slim.request","params":["",["musicartistinfo","localfiles","folder:C:/Google Drive/Music/Bob Pearce/Someone To Run To/"]]}"
    {"params":["",["musicartistinfo","localfiles","folder:C:/Google Drive/Music/Bob Pearce/Someone To Run To/"]],"method":"slim.request","id":0,"result":{"item_lo op":[{"text":"Additional Information.html","weblink":"http://192.168.1.24:9000/mai/localfile/cf02a54ea1cbe4484e42181dba2d91f6/Additional%20Information.html"}],"count":1,"offset":0}}
    C:\WINDOWS\system32>
    Location 1: LMS 8.2 on Win 10 Brix Server, x2 SB Radios, x1 Touch, x1 Controller : Location 2: LMS 8.0 on Win 10 Brix Server, x2 SB Radios, x1 Duet Receiver, x1 Controller : Alexa Mediaserver Smart Skill, Material Android, SqueezeliteX control

  5. #5765
    Senior Member
    Join Date
    Mar 2017
    Posts
    2,738
    Quote Originally Posted by staresy View Post
    That seems to have returned something....

    C:\WINDOWS\system32>curl "http://192.168.1.24:9000/jsonrpc.js" --data-raw "{"id":0,"method":"slim.request","params":["",["musicartistinfo","localfiles","folder:C:/Google Drive/Music/Bob Pearce/Someone To Run To/"]]}"
    {"params":["",["musicartistinfo","localfiles","folder:C:/Google Drive/Music/Bob Pearce/Someone To Run To/"]],"method":"slim.request","id":0,"result":{"item_lo op":[{"text":"Additional Information.html","weblink":"http://192.168.1.24:9000/mai/localfile/cf02a54ea1cbe4484e42181dba2d91f6/Additional%20Information.html"}],"count":1,"offset":0}}
    C:\WINDOWS\system32>
    Great, thanks. So I need to add a check if the start of the path is "/<letter>:/" then remove the leading slash. I'll look into this later.
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

  6. #5766
    Senior Member
    Join Date
    Jun 2005
    Location
    The South, UK
    Posts
    294
    Quote Originally Posted by cpd73 View Post
    Great, thanks. So I need to add a check if the start of the path is "/<letter>:/" then remove the leading slash. I'll look into this later.
    Cheers Craig, thanks for your help and patience.
    Location 1: LMS 8.2 on Win 10 Brix Server, x2 SB Radios, x1 Touch, x1 Controller : Location 2: LMS 8.0 on Win 10 Brix Server, x2 SB Radios, x1 Duet Receiver, x1 Controller : Alexa Mediaserver Smart Skill, Material Android, SqueezeliteX control

  7. #5767
    Senior Member
    Join Date
    Mar 2017
    Posts
    2,738
    Quote Originally Posted by staresy View Post
    Cheers Craig, thanks for your help and patience.
    I've updated the code, can you update your checkout and try?
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

  8. #5768
    Member
    Join Date
    Nov 2011
    Location
    UK
    Posts
    93
    I'm sure this question has come up before, so apologies in advance. I tried to access Material from an old Ipad Mini (which is still on IOS 9.something) and nothing at all displays in the browser screen (although a progress bar appears and disappears). The same happens in both Safari and Chrome. Any ideas ?

  9. #5769
    Senior Member
    Join Date
    Jun 2005
    Location
    The South, UK
    Posts
    294
    Quote Originally Posted by cpd73 View Post
    I've updated the code, can you update your checkout and try?
    Hi Craig, that seems to work, I can now access the local files as below...

    Name:  Capture.JPG
Views: 161
Size:  29.4 KB

    Thanks for implementing this.
    Location 1: LMS 8.2 on Win 10 Brix Server, x2 SB Radios, x1 Touch, x1 Controller : Location 2: LMS 8.0 on Win 10 Brix Server, x2 SB Radios, x1 Duet Receiver, x1 Controller : Alexa Mediaserver Smart Skill, Material Android, SqueezeliteX control

  10. #5770
    Senior Member
    Join Date
    Mar 2017
    Posts
    2,738
    Quote Originally Posted by tw99 View Post
    I'm sure this question has come up before, so apologies in advance. I tried to access Material from an old Ipad Mini (which is still on IOS 9.something) and nothing at all displays in the browser screen (although a progress bar appears and disappears). The same happens in both Safari and Chrome. Any ideas ?
    Sorry, browser is too old. And seeing as it's iOS, you cannot install an alternative. With iOS all browsers use the Safari engine underneath.
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •