Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    833
    Quote Originally Posted by pputzer View Post
    I gather that the commands are run on the LMS server itself, though?
    Correct

    We'd still need a daemon on the player to act on the events?
    No, the server can execute commands on the clients e.g. with ssh
    The external command run by the plugin gets the player / client information (technically, the LMS player status) passed as a parameter, so that's easily done in e.g. a shell script.

  2. #12
    Quote Originally Posted by Roland0 View Post
    No, the server can execute commands on the clients e.g. with ssh
    The external command run by the plugin gets the player / client information (technically, the LMS player status) passed as a parameter, so that's easily done in e.g. a shell script.
    So the script would have to parse the player ID from the parameter? While doable, that does not seem "easy" to me. While the functionality overlaps, I don't see any benefits in having event subscription happening in an LMS plugin (as opposed to a daemon using the CLI).

  3. #13
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    833
    Quote Originally Posted by pputzer View Post
    So the script would have to parse the player ID from the parameter? While doable, that does not seem "easy" to me.
    Code:
    PLAYER_IP=$(echo $2|grep -o '"[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*:'|tr -d '":')
    PLAYER_NAME=$(echo $2|sed -e 's#\(.*"player_name":"\)\([^"]*\)"\(.*\)#\2#')
    While the functionality overlaps, I don't see any benefits in having event subscription happening in an LMS plugin (as opposed to a daemon using the CLI).
    Nothing to install / run on the client, zero dependencies
    Better performance / less overhead
    Simpler implementation
    Generic solution for all events

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
  •