Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Senior Member
    Join Date
    Apr 2005
    Location
    London
    Posts
    647

    Creating Jive Menus

    Is the set of options that Jive accepts to create menus documented anywhere? I couldn't find it on the wiki - would it be useful to document there?

    So I have some questions on the options I've seen and used:
    1) what's the difference between actions->do and actions->go?
    2) what's the difference between ___INPUT___ and ___TAGGEDINPUT___?
    3) If showing radio buttons, is the item with radio=>1 supposed to show up already checked? (If so, it seems to be broken)
    4) what's 'offset' for? (It always seems to be zero)
    5) what does params => {menu => 'nowhere'} do?
    6) what does itemsParams => 'params' do?

    James

  2. #2
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    10,843
    Quote Originally Posted by James View Post
    Is the set of options that Jive accepts to create menus documented anywhere? I couldn't find it on the wiki - would it be useful to document there?
    Here is some documentation:
    http://svn.slimdevices.com/*checkout...html?root=Jive


    Quote Originally Posted by James View Post
    1) what's the difference between actions->do and actions->go?
    See the link above

    Quote Originally Posted by James View Post
    2) what's the difference between ___INPUT___ and ___TAGGEDINPUT___?
    See the link above

    Quote Originally Posted by James View Post
    3) If showing radio buttons, is the item with radio=>1 supposed to show up already checked? (If so, it seems to be broken)
    No idea

    Quote Originally Posted by James View Post
    4) what's 'offset' for? (It always seems to be zero)
    When the Jive remote requests a menu it adds two parameter to the CLI command. An offset and a number of items parameter.
    If you have a menu that contains a lot of items, you will see that Jive will first request it as:
    xxx yyy 0 100
    And then:
    xxx yyy 100 100

    That is, it requests 100 each time. To make it work this way it is also important that you send back the total number of items in the count variable even though the item_loop just contain 100 items. If the item_loop contains the same amount of items as the count result parameter, it will only do one request.

    I'm guessing that the purpose is to make a 10000 item list visible on the remote after the first 100 items has been retrieved and then retrieve the next 9900 items in the background.

    Quote Originally Posted by James View Post
    5) what does params => {menu => 'nowhere'} do?
    I'm not completely sure, but I think this is just a parameter that SqueezeCenter CLI command understands. The CLI handlers in SqueezeCenter browse commands checks if a "menu" parameter exists to decide if they should return a Jive CLI response or a normal response. So all SqueezeCenter browse menus needs a "menu" parameter to return a CLI response that Jive understands. I think "nowhere" is just used when you like to indicate that you wan't a Jive response but doesn't want to set the menu parameter to something special.

    Quote Originally Posted by James View Post
    6) what does itemsParams => 'params' do?
    It's explain in the link I mentioned above.

    I believe it's used together with the "base" block to make it possible to put things that are similar for all returned items in one place and just define additional things for each item. itemsParams=>'params' means that it will look for additional parameters in a result parameter called 'params' for each item in the item_loop.
    Erland Isaksson (My homepage)
    (Developer of many plugins/applets (both free and commercial).
    If you like to encourage future presence on this forum and/or third party plugin/applet development, consider purchasing some plugins)

    Interested in the future of music streaming ? ickStream - A world of music at your fingertips.

  3. #3
    Ne'er-do-well, Vagabond bklaas's Avatar
    Join Date
    Apr 2005
    Location
    Minneapolis, MN
    Posts
    2,024
    Quote Originally Posted by James View Post
    Is the set of options that Jive accepts to create menus documented anywhere? I couldn't find it on the wiki - would it be useful to document there?

    So I have some questions on the options I've seen and used:
    1) what's the difference between actions->do and actions->go?
    2) what's the difference between ___INPUT___ and ___TAGGEDINPUT___?
    3) If showing radio buttons, is the item with radio=>1 supposed to show up already checked? (If so, it seems to be broken)
    4) what's 'offset' for? (It always seems to be zero)
    5) what does params => {menu => 'nowhere'} do?
    6) what does itemsParams => 'params' do?

    James
    There is documentation in your jive checkout--

    src/pkg/jive/doc/html/jiveMLON.html
    (I have no idea what jiveMLON stands for)

    1) do is an action that is executed without pushing the Jive UI to a new window. go is an action that executes and pushes the Jive UI to the next window.

    2) Two different ways of formatting data sent to SC cli.

    from jiveMLON.html

    params
    Hash of parameters, f.e. {sort = new}. Passed to the server in the form "key:value", f.e. 'sort:new'.

    * The value "__INPUT__" is replaced by any user entered data.
    * The value "__TAGGEDINPUT__" is replaced by user entered data in a "key:value" format. For example, the param foo = "__TAGGEDINPUT__" would be replaced by 'foo:<user-entered input>'

    3) Yes, that's how it's supposed to work, and you are right-- it's broken. Opened bug 6045 on it http://bugs.slimdevices.com/show_bug.cgi?id=6045

    4) I don't know what "offset" means either and it isn't covered in the JiveMLON doc. Maybe if Fred is lurking on this thread he can clear that up. I'd like to know the answer to that too.

    5) everything I've tried to type for an answer here has come out convoluted and not helpful. Perhaps someone else can pipe in on that one.

    6) from jiveMLON doc, though this may not make it any clearer, as it doesn't for me...

    itemParams
    In base level commands, this defines the name of the field in the item <actions_fields> that must be used to complete the command for a particular item. See the example below.

    #!/ben
    Former Logitech Developer: Squeezeplay/SqueezeOS/SqueezeboxController/SqueezeCenter
    Community Developer: Nokia770Skin (r.i.p.)

    http://www.last.fm/user/bklaas/
    KHAAAN!...BUNNIES!

  4. #4
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    10,843
    Quote Originally Posted by bklaas View Post
    1) do is an action that is executed without pushing the Jive UI to a new window. go is an action that executes and pushes the Jive UI to the next window.
    This morning I was trying to open a menu with play-hold action, I posted also a message in the Developers forum regarding it since I didn't get it to work.

    Is the "go" action the only one that pushes Jive into a new window ?
    Does this mean that I can use different remote keys to open different menus from the same item ?
    I'm trying to do something similar as the "play.hold" key in the player interface that launches the mixer menu.
    Erland Isaksson (My homepage)
    (Developer of many plugins/applets (both free and commercial).
    If you like to encourage future presence on this forum and/or third party plugin/applet development, consider purchasing some plugins)

    Interested in the future of music streaming ? ickStream - A world of music at your fingertips.

  5. #5
    Ne'er-do-well, Vagabond bklaas's Avatar
    Join Date
    Apr 2005
    Location
    Minneapolis, MN
    Posts
    2,024
    Quote Originally Posted by bklaas View Post
    3) Yes, that's how it's supposed to work, and you are right-- it's broken. Opened bug 6045 on it http://bugs.slimdevices.com/show_bug.cgi?id=6045
    I fixed bug 6045 in Jive checkin r821
    #!/ben
    Former Logitech Developer: Squeezeplay/SqueezeOS/SqueezeboxController/SqueezeCenter
    Community Developer: Nokia770Skin (r.i.p.)

    http://www.last.fm/user/bklaas/
    KHAAAN!...BUNNIES!

  6. #6
    Ne'er-do-well, Vagabond bklaas's Avatar
    Join Date
    Apr 2005
    Location
    Minneapolis, MN
    Posts
    2,024
    Quote Originally Posted by erland View Post
    This morning I was trying to open a menu with play-hold action, I posted also a message in the Developers forum regarding it since I didn't get it to work.

    Is the "go" action the only one that pushes Jive into a new window ?
    Does this mean that I can use different remote keys to open different menus from the same item ?
    I'm trying to do something similar as the "play.hold" key in the player interface that launches the mixer menu.
    Erland, sorry I didn't respond to your dev thread, but I'm afraid the short answer to your problem is that at this time there is no facility for doing what you want to do. Right now we have "go" and we have "do".

    #!/ben
    Former Logitech Developer: Squeezeplay/SqueezeOS/SqueezeboxController/SqueezeCenter
    Community Developer: Nokia770Skin (r.i.p.)

    http://www.last.fm/user/bklaas/
    KHAAAN!...BUNNIES!

  7. #7
    Senior Member
    Join Date
    Apr 2005
    Location
    London
    Posts
    647
    Very helpful - thanks guys!

    James

  8. #8
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    10,843
    Quote Originally Posted by bklaas View Post
    Erland, sorry I didn't respond to your dev thread, but I'm afraid the short answer to your problem is that at this time there is no facility for doing what you want to do. Right now we have "go" and we have "do".
    It would be good if it was possible to specify if a new window should be opened or not with a result parameter instead of hardcoding it to specific key codes.
    Erland Isaksson (My homepage)
    (Developer of many plugins/applets (both free and commercial).
    If you like to encourage future presence on this forum and/or third party plugin/applet development, consider purchasing some plugins)

    Interested in the future of music streaming ? ickStream - A world of music at your fingertips.

  9. #9
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    10,843
    Quote Originally Posted by erland View Post
    This morning I was trying to open a menu with play-hold action, I posted also a message in the Developers forum regarding it since I didn't get it to work.

    Is the "go" action the only one that pushes Jive into a new window ?
    Does this mean that I can use different remote keys to open different menus from the same item ?
    I'm trying to do something similar as the "play.hold" key in the player interface that launches the mixer menu.
    Just for information, I wrote an enhancement request regarding this:
    http://bugs.slimdevices.com/show_bug.cgi?id=6055
    Erland Isaksson (My homepage)
    (Developer of many plugins/applets (both free and commercial).
    If you like to encourage future presence on this forum and/or third party plugin/applet development, consider purchasing some plugins)

    Interested in the future of music streaming ? ickStream - A world of music at your fingertips.

  10. #10
    Senior Member
    Join Date
    Jun 2005
    Location
    Switzerland
    Posts
    610
    Quote Originally Posted by bklaas View Post
    Maybe if Fred is lurking on this thread...
    I am

    I have no idea what jiveMLON stands for
    At some point there were intense debates about which markup to use, OPML or JSON. The data model was the same however, so I started to document stuff in a document called jiveMLON (i.e. jive OPML JSON) and it stuck (mainly because nobody cares what this is called - if anyone did, it would get a better name .

    I don't know what "offset" means either and it isn't covered in the JiveMLON doc
    erland did a good job explaining it, but it's basically the index of the first item in the current data block in the overall complete list, whose cardinality is given by "count". In other terms, it's used for paging in long lists.

    5) what does params => {menu => 'nowhere'} do?
    We needed a way to indicate to queries the format of the output (since the same request can be used for CLI and JSON calls). I arbitrarily decided on "menu" as an indicator JSON was required. Depending on the query, the value of the menu param may or not be significant. Its used by DB queries to capture the next step in the descent (genres->artists->albums->tracks, genres has menu:artists). The best is to check the query called.


    6) what does itemsParams => 'params' do?
    It's "data compression". The JiveMLON format can describe a regular menu, in which the action is potentially different for each menu item. However in a typical descent (genres->artists->...), you're doing the exact same thing for each genre, the only difference is the id acted upon.

    From that comes the "base" command idea, which indicates what to for each item. In general, it must be completed by one particular parameter specific to each item. Rather than arbitrarily decide on a name for an item value that would constitute extra parameters for a base command, I have allowed the jiveMLON writer to provide in param "itemsParams" the name of the field in each item that constitutes parameters for the base command (the intention was to avoid name clashes).

    So when you click on an item, Jive checks for an action defined in the item, if not it looks for one in the header. If an action is defined in the header and a value A is provided in itemsParams, Jive looks for a key A in the item and adds its value to the command hash before sending it.

    It would be good if it was possible to specify if a new window should be opened or not with a result parameter instead of hardcoding it to specific key codes.
    There have been numerous debates on the approach to use for Jive, how much of it was under SC control, how much of it it did "by itself". What you're asking here is for SC to have even more control, so that an interface that would open a window when clicking on pause would be possible. Holding volume down would naturally close it

    IMHO, we should use the screen real estate of Jive to the benefit of the user interface and not rush to re-impement on it the obscure shortcuts that the SqueezeBox much more limited interface(s) made necessary. In other terms, the current format forces plugin and SC authors into a coherent approach where only the center button opens windows. That's why I purposefully avoided doing things how bug 6021 proposes when I wrote the format.

    I am only explaining this to provide the background. Ben and Dean are the ones to cajole to get it your way

    HTH

    Fred

Posting Permissions

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