Home of the Squeezebox™ & Transporter® network music players.
Page 16 of 17 FirstFirst ... 614151617 LastLast
Results 151 to 160 of 170
  1. #151
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    1,277
    Sorry for sending you down that route - but well done!
    In the end I think that you will have built an upgrade route for all Joggler users - whether they want to have a local player or not.
    Paul Webster
    http://dabdig.blogspot.com
    Author Radio France (FIP etc) plugin

  2. #152
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    760
    Quote Originally Posted by Paul Webster View Post
    Sorry for sending you down that route...
    It's all part of the fun!

    I've had a couple of days away from this, but today I've got a rudimentary Applet set up to call my script with the necessary arguments. It's a bit of an uphill struggle at the moment!



    I'd like to have fewer menu items, with text that toggles depending on the player state, i.e. if the internal player isn't running then it should say 'Start SqueezeLite...' and if it's already running then it should say 'Kill SqueezeLite....' etc. My bash script can do those things, but I'm struggling with the Jive/Lua menus.

    And I'd like the 'Start SqueezeLite...' menu items to lead to another menu level, where I can enter the player name for instance, but although I can bring up a text entry window I've had enormous trouble (by which I mean I've failed) getting the entered text back into the settings file. Whenever I try to update my settings file (e.g. with self:getSettings()['sqname'] = sqltname) the settings file seems to get corrupted from
    Code:
    settings = {sqname="Squeezelite",}
    to
    Code:
    settings = {sqname={s="Squeezelite",},}
    I can't figure out what's adding that '{s=', but whatever it is it means that I can no longer read back the settings,

    And I don't know how to make a 2nd level menu - the 'SimpleMenu' command puts all the menu entries at one level, so I can't see how to make a sub-menu underneath one of those menu items.

    So any broad pointers on how to do all this would be really useful. I've looked at the info in the wiki (e.g. here), and a number of sample Applets, but I'm still struggling. The way the 'Squeezebox Name' applet works is what I'm looking for - it remembers the text you type between visits to that menu - but I can't even find the file where that code exists!

  3. #153
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    760
    ...oh, and is there a list of the available icons somewhere?

  4. #154
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,174

    Jivelite on a Joggler

    > ...oh, and is there a list of the available icons somewhere?

    Is this what you're looking for?

    https://github.com/Logitech/squeezep...lic/7.8/assets

    or

    https://github.com/ralph-irving/jive...ridSkin/images

    --

    Michael

  5. #155
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    760
    Thanks Michael - maaaaybe. I started my Applet by copying one from the Sqeezeplay build for Joggler, called 'JogglerNetwork'. That one uses an icon that's referred to as 'wired".

    Code:
    	jiveMain:addItem(meta:menuItem('appletJogglerNetwork', 'settings', "NETWORK", 
    	function(applet, ...) applet:setupJogglerNetwork(...) end, 59, nil, "wired"))
    I can't find an icon with the word "wired' in it in either of the locations you linked to. I'm guessing there may be some kind of translation between that keyword "wired" and a filename, but even so, none of the icons in those locations look as though they could be this particular one. I want to use something other than "wired", but until I can figure out the link between the keyword and the file I don't know what other keywords are available.

  6. #156
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    760
    I found the icon that gets displayed by the "wired" keyword. It looks like this one.



    But I can't yet see how it's related to the word "wired".

  7. #157
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    760
    Quote Originally Posted by chill View Post
    But I can't yet see how it's related to the word "wired".
    I got there - load 'em up in JogglerSkinApplet.

    Last edited by chill; 2019-02-07 at 16:54.

  8. #158
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    760
    I think this approach is clearer, and easier to programme!



    For the external interface I'd like a menu that allows me to pick the device, pCP-style. My bash script can return a list:
    Code:
    root@openframe:~/jivelite/bin# j4j_squeezelite.sh list USB
    sysdefault:CARD=DragonFly
    front:CARD=DragonFly,DEV=0
    surround21:CARD=DragonFly,DEV=0
    surround40:CARD=DragonFly,DEV=0
    surround41:CARD=DragonFly,DEV=0
    surround50:CARD=DragonFly,DEV=0
    surround51:CARD=DragonFly,DEV=0
    surround71:CARD=DragonFly,DEV=0
    iec958:CARD=DragonFly,DEV=0
    dmix:CARD=DragonFly,DEV=0
    dsnoop:CARD=DragonFly,DEV=0
    hw:CARD=DragonFly,DEV=0
    plughw:CARD=DragonFly,DEV=0
    But I understand that a bash script can only return a single value to the applet, not a list. So what's the best way to get this list back into the applet code, and then make a menu item for each line?

  9. #159
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    760
    Quote Originally Posted by chill View Post
    But I understand that a bash script can only return a single value to the applet, not a list. So what's the best way to get this list back into the applet code, and then make a menu item for each line?
    I found this function to capture shell output:
    Code:
    -- Allows output of shell scripts to be captured.
    function os.capture(cmd)
      local f = io.popen(cmd, 'r')
      local s = f:read('*a')
      f:close()
      return s
    end
    So now I can get a list of USB audio devices into the applet. I've also found out how to add items to a menu, so when I find out how to split my list of devices into separate items I should be able to generate a group of radio buttons to select one of the USB audio devices.


    And the simpler interface I showed above is now working. It detects whether there's a player on either interface and sets the check box accordingly, and then it allows the player to be created or killed.

    Nearly there I think. I must get back to tackling the screensaver at some point. I started all this to have a Joggler as a controller without a player.

  10. #160
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    760
    Getting there:


    With a different DAC connected:
    Last edited by chill; 2019-02-08 at 23:33.

Posting Permissions

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