Home of the Squeezebox™ & Transporter® network music players.
Page 899 of 914 FirstFirst ... 399799849889897898899900901909 ... LastLast
Results 8,981 to 8,990 of 9136
  1. #8981
    Senior Member
    Join Date
    Oct 2014
    Location
    Pittsburgh PA
    Posts
    408
    Quote Originally Posted by SamY View Post
    I didn't use that MAC address in my testing. I also verified that other requests, such as the one that was corrected by the last code change to specify the artist_id, completed successfully using the 'curl' command.
    Debug log from Material Skin JSON request. Note the '25_000'. Could that be related to the problem?

    Code:
    22-08-03 17:18:49.5940] Slim::Web::JSONRPC::handleURI (158) JSON parsed procedure: {
      id => 4,
      method => "slim.request",
      params => [
            "b8:26:eb:c1:71:f0",
            [
              "browseonlineartist",
              "items",
              0,
              25_000,
              "item_id:2",
              "menu:browseonlineartist",
            ],
          ],
    }
    Sam

  2. #8982
    Senior Member
    Join Date
    Oct 2014
    Location
    Pittsburgh PA
    Posts
    408
    Quote Originally Posted by SamY View Post
    Debug log from Material Skin JSON request. Note the '25_000'. Could that be related to the problem?

    Code:
    22-08-03 17:18:49.5940] Slim::Web::JSONRPC::handleURI (158) JSON parsed procedure: {
      id => 4,
      method => "slim.request",
      params => [
            "b8:26:eb:c1:71:f0",
            [
              "browseonlineartist",
              "items",
              0,
              25_000,
              "item_id:2",
              "menu:browseonlineartist",
            ],
          ],
    }
    Never mind. Verified that all requests are formatted that way. Do any other client apps/skins use JSON rather than Cometd?
    Sam

  3. #8983
    Senior Member
    Join Date
    Mar 2017
    Posts
    3,682
    Quote Originally Posted by SamY View Post
    Never mind. Verified that all requests are formatted that way. Do any other client apps/skins use JSON rather than Cometd?
    The "25_000" is a perl thing to make numbers more readable. Caught me out too. AFAIK, iPeng, Squeezer, SqueezeCtrl use JSONRPC but make calls over their cometd connection. Material uses cometd only for notifications, due to it being a web app. However, the API calls should be the same.

    The curl examples I posted were just to try and see what commands work. So start with the parameters as used by Squeezer, and then try again with 25000 instead of 512, etc. Basically trying to work out what makes the Squeezer call work and the Material one fail.
    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. #8984
    Senior Member
    Join Date
    Oct 2014
    Location
    Pittsburgh PA
    Posts
    408

    Problem solved!!! (see below...)

    Quote Originally Posted by cpd73 View Post
    The "25_000" is a perl thing to make numbers more readable. Caught me out too. AFAIK, iPeng, Squeezer, SqueezeCtrl use JSONRPC but make calls over their cometd connection. Material uses cometd only for notifications, due to it being a web app. However, the API calls should be the same.

    The curl examples I posted were just to try and see what commands work. So start with the parameters as used by Squeezer, and then try again with 25000 instead of 512, etc. Basically trying to work out what makes the Squeezer call work and the Material one fail.
    I understand what you're trying to do, and I tried all the different combinations of parms you suggested plus more. They all return the same error. Here is an exact copy of the parms used by Squeezer in its successful cometD request:

    Code:
    curl -X POST -d '{"id":25,"method":"slim.request","params":["cc:cc:4c:51:85:cb",["browseonlineartist","items",0,512,"service_id:qobuz","item_id:2","useContextMenu:
    1","menu:browseonlineartist"]]}' localhost:9000/jsonrpc.js  
                                                                                                                           
    curl: (52) Empty reply from server
    And here is the request that is used to retrieve the menu immediately prior to this one in Material Skin:

    Code:
    curl -X POST -d '{"id":25,"method":"slim.request","params":["cc:cc:4c:51:85:cb",["browseonlineartist","items",0,512,"service_id:qobuz","artist_id:42442","menu:1"]]
    }' localhost:9000/jsonrpc.js
                                                                                                                                                           
    {"params":["cc:cc:4c:51:85:cb",["browseonlineartist","items","0",512,"service_id:qobuz","artist_id:42442","menu:1"]],"id":25,"result":{"count":5,"offset":0,"window":{"windowStyle"
    :"home_menu"},"item_loop":[{"icon":"html/images/albums.png","actions":{"go":{"cmd":["browseonlineartist","items"],"params":{"item_id":"0","menu":"browseonlineartist"}}},"addAction
    ":"go","text":"Albums"},{"icon":"html/images/playlists.png","actions":{"go":{"params":{"item_id":"1","menu":"browseonlineartist"},"cmd":["browseonlineartist","items"]}},"addAction
    ":"go","text":"Songs"},{"addAction":"go","actions":{"go":{"params":{"menu":"browseonlineartist","item_id":"2"},"cmd":["browseonlineartist","items"]}},"text":"Biography","icon":"/i
    mageproxy/https%3A%2F%2Fstatic.qobuz.com%2Fimages%2Fartists%2Fcovers%2Flarge%2F410b23299a004946010fcaec10cc63b3.jpg/image.jpg"},{"text":"Similar Artists","actions":{"go":{"cmd":["
    browseonlineartist","items"],"params":{"item_id":"3","menu":"browseonlineartist"}}},"addAction":"go","icon":"html/images/artists.png"},{"addAction":"go","actions":{"go":{"nextWind
    ow":"parent","params":{"item_id":"4","menu":"browseonlineartist"},"cmd":["browseonlineartist","items"]}},"text":"Add 'Afro Celt Sound System' to favorites","icon":"html/images/fav
    orites.png"}],"base":{"actions":{"play":{"nextWindow":"nowPlaying","itemsParams":"params","player":0,"params":{"menu":"browseonlineartist"},"cmd":["browseonlineartist","playlist",
    "play"]},"add":{"itemsParams":"params","player":0,"params":{"menu":"browseonlineartist"},"cmd":["browseonlineartist","playlist","add"]},"playControl":{"params":{"menu":"1","_quant
    ity":"512","_index":"0","service_id":"qobuz","artist_id":"42442"},"cmd":["browseonlineartist","items"],"window":{"isContextMenu":1},"player":0,"itemsParams":"playControlParams"},"
    more":{"params":{"menu":"browseonlineartist"},"window":{"isContextMenu":1},"cmd":["browseonlineartist","items"],"itemsParams":"params","player":0},"add-hold":{"player":0,"itemsPar
    ams":"params","cmd":["browseonlineartist","playlist","insert"],"params":{"menu":"browseonlineartist"}},"go":{"params":{"menu":"browseonlineartist"},"cmd":["browseonlineartist","it
    ems"],"itemsParams":"params"}}}},"method":"slim.request"}
    ***ALERT***ALERT***

    Just for the heck of it, I decided to add the "artist_id" parameter to the request, even though it isn't used in Squeezer's cometD request and VOILA!!!

    Code:
    $ curl -X POST -d '{"id":25,"method":"slim.request","params":["cc:cc:4c:51:85:cb",["browseonlineartist","items",0,512,"service_id:qobuz","item_id:2","artist_id:42442","useContextMenu:1","menu:browseonlineartist"]]}' localhost:9000/jsonrpc.js   
                                                                                                        
    {"method":"slim.request","result":{"title":"Biography","base":{"actions":{"go":{"nextWindow":"nowPlaying","params":{"menu":"browseonlineartist"},"cmd":["browseonlineartist","playlist","play"],"itemsParams":"params","player":0},"more":{"player":0,"itemsParams":"params","cmd":["browseonlineartist","items"],"window":{"isContextMenu":1},"params":{"menu":"browseonlineartist"}},"add-hold":{"params":{"menu":"browseonlineartist"},"cmd":["browseonlineartist","playlist","insert"],"player":0,"itemsParams":"params"},"playControl":{"itemsParams
    ":"playControlParams","player":0,"cmd":["browseonlineartist","items"],"window":{"isContextMenu":1},"params":{"_quantity":"512","_index":"0","menu":"browseonlineartist","item_id":"
    2","useContextMenu":"1","artist_id":"42442","service_id":"qobuz"}},"add":{"params":{"menu":"browseonlineartist"},"cmd":["browseonlineartist","playlist","add"],"player":0,"itemsPar
    ams":"params"},"play":{"nextWindow":"nowPlaying","params":{"menu":"browseonlineartist"},"cmd":["browseonlineartist","playlist","play"],"itemsParams":"params","player":0}}},"window
    ":{"windowStyle":"text_list","textarea":"A world music fusion of African and Celtic traditions with electronic dance elements, Afro Celt Sound System rose to international acclaim in the late 1990s. Spearheaded by British musician and producer Simon Emmerson, the revolving collective of musicians enjoyed success with a series of albums on Real World Records including 1999's Volume 2: Release and 2005's Volume 5: Anatomic. (etc, etc, etc....."},"item_loop":[{}],"offset":0,"
    count":0},"id":25,"params":["cc:cc:4c:51:85:cb",["browseonlineartist","items","0",512,"service_id:qobuz","item_id:2","artist_id:42442","useContextMenu:1","menu:browseonlineartist"
    So I guess that's the solution. The question is WHY????
    Sam

  5. #8985

    Setting different libraries on different player

    Hi
    i don't know if this is the right thread, but i'll try, Michael suggest this

    that's what i'd like to do
    i search around and tried a lot without any luck, so i'm here asking if anybody knows how...
    i have the last LMS version, 8.3, tidal plug-in with online music integration, 4 chromecast "station" (actually, two of them are nest speakers) and i control everything with material skin, on some old smartphone around the house
    my server is on a picoreplayer raspberry
    so, when i play a song or a album, at the end, i would like to have different "mixes" of song, chosing from different virtual library, so music in my bedroom would be different from music in my kitchen, i mean playng from different library
    but, here is the problem, it seems that the library i set in the "random mix" page on material skin has to be the one for all the players, even if i set a different one in the settings of that player, and despite the type of DSTM mix i choose
    sorry if i'm not enough clear, i could give more information, i am confused about the many voices between to choose...
    thanks for help!

  6. #8986
    Senior Member
    Join Date
    Mar 2017
    Posts
    3,682
    Quote Originally Posted by SamY View Post
    So I guess that's the solution. The question is WHY????
    The problem is the SlimBrowse response responsible for the list does not state artist_id is required, or where it should be. And the same API call works from Squeezer without this. So either:

    1. LMS expects a consistent connection from client to LMS, hence artist_id not required - if so, not sure what Material can do as it does not use cometd for API calls, only for notifications
    2. The response message is incorrect, and it should state that artist_id is a required parameter
    3. The Qobuz plugin has an issue


    As to which is the actual issue, or which combination, I have no idea. This would be up to either Michael or the Qobuz author to determine. Noet I'm not saying the issue is there, as it could be a Material issue, I'm just not sure.
    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.

  7. #8987
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,749

    Announce: Material Skin

    > - LMS expects a consistent connection from client to LMS, hence
    > artist_id not required - if so, not sure what Material can do as it
    > does not use cometd for API calls, only for notifications


    LMS does indeed cache results for queries which come over a persistent
    connection.

    > - The response message is incorrect, and it should state that
    > artist_id is a required parameter


    artist_id indeed is required, and item_id is ignored.

  8. #8988
    Senior Member
    Join Date
    Oct 2014
    Location
    Pittsburgh PA
    Posts
    408
    Quote Originally Posted by mherger View Post
    > - The response message is incorrect, and it should state that
    > artist_id is a required parameter

    artist_id indeed is required, and item_id is ignored.
    I don't understand how item_id can be ignored, as it indicates which of the artist attributes is being requested. In the logs posted above, "item_id:2" causes the Biography to be returned. "item_id:0" returns the list of Albums for the artist, etc.
    Last edited by SamY; 2022-08-08 at 13:58.
    Sam

  9. #8989
    Senior Member
    Join Date
    Oct 2014
    Location
    Pittsburgh PA
    Posts
    408
    Quote Originally Posted by mherger View Post

    > - The response message is incorrect, and it should state that
    > artist_id is a required parameter

    artist_id indeed is required, and item_id is ignored.
    So, putting aside whether item_id is ignored or not, is there agreement that artist_id is required and that the problem lies with the fact that the LMS response to the previous request is incorrectly failing to indicate that fact to the client?
    Sam

  10. #8990
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,749

    Announce: Material Skin

    > So, putting aside whether item_id is ignored or not, is there agreement

    I might have not dug deeply enough to find the use of item_id. But as
    you pointed out, it must be used at some point. But what I found is that
    if the artist_id was missing and you weren't using a persistent
    connection (cometd), then the request would be rejected early. The
    item_id might be evaluated further down the code, once LMS has got
    information about the artist.

    > that artist_id is required and that the problem lies with the fact that
    > the LMS response to the previous request is incorrectly failing to
    > indicate that fact to the client?


    The problem lies in an incomplete documentation. Or sparse error
    logging. As you like. But hey, feel free to add some :-).

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
  •