Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 5 of 5
  1. #1
    Senior Member Locuth's Avatar
    Join Date
    Apr 2009
    Posts
    601

    player-specific prefs

    Hi there,

    Is there a way to check if a player supports a particular preference?

    In the web interface, different types of players offer different prefs.
    Nevertheless it is possible to query/set all playerprefs via CLI.

    The web-interface uses the conditional "prefs.exists('some_pref')".
    Is there something like that for CLI ?

    Or even better: Is there a way to get a list of player supported prefs?
    I was wondering if (in the 'server.prefs' file) the '_ts_somepref' values have any relevancy to that end. What is their purpose?

    Thanks
    Sebastian
    Use your PDA/Phone as SqueezeBox remote -- http://sc.sciatec.de

  2. #2
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    14,767
    which ones are you looking for?
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

  3. #3
    Senior Member Locuth's Avatar
    Join Date
    Apr 2009
    Posts
    601
    Hey Pip

    I am implementing a player-settings dialog.
    So far I have been collecting the available preferences by browsing through various 'strings.txt" and 'xxx.prefs' files.


    But I have yet to find a way to tell which prefs are actually supported.
    E.g. I can well apply display settings to an SB Duet. Although they have of course no effect.
    So I'd like to only present the player-specific sensible prefs to the user.


    BTW:
    Appearently, the localization Tags (e.g. SETUP_REPLAYGAINMODE) need to be hard-coded in my CLI-client. Do they not ?

    Also, I found it awkward to 'localize' plugin url's like "randomplay://albums" -> RANDOM_PLAY_ALBUMS -> "Albummix".

    The tagging/localization scheme is somehow not consistent

    Thanks for helping again:-)
    Sebastian


    EDIT:
    If I only knew, which ones I am looking for ^^.
    I wish I could query SQC for that information.
    Last edited by Locuth; 2009-10-30 at 09:19.
    Use your PDA/Phone as SqueezeBox remote -- http://sc.sciatec.de

  4. #4
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    14,767
    Why on earth are you doing that? How about just displaying the web page?
    The interesting ones do have their own commands.

    I don't understand the point with the localization strings. You can get the translation using the "getstring" command. what do you mean by "hard-coded"? You do, of course, need to know what you want to display...

    You can get player prefs using the "playerpref" command.
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

  5. #5
    Senior Member Locuth's Avatar
    Join Date
    Apr 2009
    Posts
    601
    Quote Originally Posted by pippin View Post
    Why on earth are you doing that? How about just displaying the web page?
    The interesting ones do have their own commands.
    I wanted to give my settings-dialog a look that's consistent with the program. That's why I did it.

    I don't understand the point with the localization strings. You can get the translation using the "getstring" command. what do you mean by "hard-coded"? You do, of course, need to know what you want to display...
    Yes I use getstring to query localized strings.
    The tags I pass to getstring can be found in strings.txt and have to be hard-coded into my code.

    You can get player prefs using the "playerpref" command.
    The way I've designed things now, I do not need to know much about a particular playerpref. Only, if it's text, integer, or an 'option'.
    So it would be cool to query SQC. for which prefs it exposes.
    Rather than having to know which prefs to query/set.

    ## pseudo code ##
    SQerver.GetPrefTags(&AllKnownTags)

    FOR Tag IN AllKnownTags
    {
    Pref = Server.GetPref(Tag)
    IF Pref.Type==INTEGER
    ShowIntValue(Pref.Value)
    ELSE IF
    ...
    }
    Use your PDA/Phone as SqueezeBox remote -- http://sc.sciatec.de

Posting Permissions

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