Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Senior Member
    Join Date
    Jul 2010
    Posts
    113
    Quote Originally Posted by Roland0 View Post
    see the _extractTrackInfo in Player.lua for how to access the status (basically playerStatus.item_loop[1].artist etc.)
    Maybe helpful: How to dump a table to console?
    I'm sorry. That may have been a misunderstanding. It's not that I struggle with dumping a table. What I actually meant was that even though I added the k for comment to the status tags parameter it seems that I'm not getting anything comments related back from the server.
    Here's an example of a normal server response for the status query mentioned in the last post:
    Code:
    playerStatus.item_loop[1]:
    { 
    	["album"] = Music for Torching,
    	["trackType"] = local,
    	["icon-id"] = aa25c157,
    	["track"] = What's New?,
    	["style"] = itemplay,
    	["text"] = What's New?
    Billie Holiday - Music for Torching,
    	["artist"] = Billie Holiday,
    	["params"] = {
    			["playlist_index"] = 0,
    			["track_id"] = 54,
    		},
    }
    If anywhere I'd guessed to find the comments tag value in here. Just to be sure I've looked at the complete playerstatus table, no comment anywhere. I know the CLI documentation says status should support the same tags as songinfo but I have no idea why the comment tag value doesn't get returned. I couldn't fix that or get it to work. That's the only reason I reverted to the server:userrequest with songinfo to get the comment tag value.

    EDIT: I used a script to send the command (mentionied above) to LMS outside of SqueezePlay and it turns out that if you use 'menu:menu' the tag parameter seems to be ignored. It will always return the same tags. If you drop 'menu:menu' it will return the comment tag. I'm not sure but I suppose it's in line with what is defined in the LMS code, i.e. Queries.pm. Since you can't drop 'menu:menu' in player.lua without breaking it I don't really see how I can use the playerstatus to get the comment tag value.
    Last edited by afriend; 2020-08-23 at 05:02.

  2. #12
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    1,075
    Quote Originally Posted by afriend View Post
    I used a script to send the command (mentionied above) to LMS outside of SqueezePlay and it turns out that if you use 'menu:menu' the tag parameter seems to be ignored. It will always return the same tags. If you drop 'menu:menu' it will return the comment tag. I'm not sure but I suppose it's in line with what is defined in the LMS code, i.e. Queries.pm.
    From a quick look at Queries.pm, it seems you are right, unfortunately.

    Since you can't drop 'menu:menu' in player.lua without breaking it I don't really see how I can use the playerstatus to get the comment tag value.
    You can always add your own subscription to "status" in the applet instead.
    Various SW: Web Interface | TUI | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Chiptunes | LMSlib2go | ...
    Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

  3. #13
    Senior Member
    Join Date
    Jul 2010
    Posts
    113
    Quote Originally Posted by Roland0 View Post
    You can always add your own subscription to "status" in the applet instead.
    I'm not sure if it applies here but the LMS docs mention that "only one status subscription is possible per player and connection." And looking at commands for which subscriptions/notifications are possible, songinfo and queries in general are not among them I think.
    So only one status subscriptions per player and connection and no other means of getting the info via subscription/notification. Seems like I'll have to stick to the old server:request for better or for worse. Not elegant, not lightning fast but at least it gets the job done.

  4. #14
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    1,075
    Quote Originally Posted by afriend View Post
    I'm not sure if it applies here but the LMS docs mention that "only one status subscription is possible per player and connection."
    pretty sure this only applies to telnet connections

    And looking at commands for which subscriptions/notifications are possible, songinfo and queries in general are not among them I think.
    We're discussing the status command with the "subscription" option., not the "subscribe" command
    See post #6
    Various SW: Web Interface | TUI | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Chiptunes | LMSlib2go | ...
    Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

Posting Permissions

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