Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Mar 2017
    Posts
    1,007

    Default library_id?

    What value should be used for the default (All music library) library? I created a additional browse mode, and it seems to use -1. But for Material I had been using "0", and this also seems to work. Are either of these OK? Or is it just coincidence that they work?

    The reason I ask, is that it appears as if I set a library view by the default web UI, that this library_id seems to stick on the server. And it appears to affect Material too. To circumvent this, I want to apply library_id to all requests - so when not set by user the default "all music" library is used. But, for this to work I need to know what its ID is.

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,295

    Default library_id?

    > What value should be used for the default (All music library) library? I
    > created a additional browse mode, and it seems to use -1. But for
    > Material I had been using "0", and this also seems to work. Are either
    > of these OK? Or is it just coincidence that they work?


    Yes, "falsy" values ('', null, 0 in Perl) or -1 would return an
    un-filtered list.

    --

    Michael

  3. #3
    Senior Member
    Join Date
    Mar 2017
    Posts
    1,007
    Quote Originally Posted by mherger View Post
    > What value should be used for the default (All music library) library? I
    > created a additional browse mode, and it seems to use -1. But for
    > Material I had been using "0", and this also seems to work. Are either
    > of these OK? Or is it just coincidence that they work?


    Yes, "falsy" values ('', null, 0 in Perl) or -1 would return an
    un-filtered list.
    Thanks. I'll update my code to always send the library_id

Posting Permissions

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