barrygordon;204807 Wrote: 
> I would like to retrieve the list of all albums in the defined Library
> "Stereo Music".  The Library Stereo Music is defined a a sub directory
> of all the music "Stereo Music = D:\Music\mpgmusic".  What would the
> CLI command look like.  I am sure I can work out the response.
> 
> What if I wanted to retrieve all of the artists in the same library?
> 
> I know what I am doing with the Slimdevices CLI, but I am clearly
> missing something in the Custombrowse CLI.
To get the correct command you will need to browse the menu from the
top.

Lets say you have a menu like this:

Code:
--------------------
    
  Custom Browse
  Stereo Music
  Albums
  Album1
  Album2
  Artists
  Artist1
  Artist2
  
--------------------


To get the correct command for a list of artists first issue (xx is the
mac adress of the player):

Code:
--------------------
    
  xx:xx:xx:xx:xx:xx custombrowse browse 0 100
  
--------------------

This will give you a result with all the first 100 top level menus, in
the example it should return the "Stereo Music" entry.

Something like:

Code:
--------------------
    
  xx:xx:xx:xx:xx:xx custombrowse browse 0 100 count:1 
level:multilibrary_stereomusic itemid:multilibrary_stereomusic itemname:Stereo 
Music
  
--------------------


The important thing in the response is the "level" and "itemid"
response parameters, this will get us to the next level. So for listing
sub directories below the "Stereo Music" folder we would issue:

Code:
--------------------
    
  xx:xx:xx:xx:xx:xx custombrowse browse 0 100 
hierarchy:multilibrary_stereomusic 
multilibrary_stereomusic:multilibrary_stereomusic
--------------------

The hierarchy parameter is: hierarchy:<level>
And the values after it is: <level>:<itemid>

Anyway, the above command result which contains the "Albums" and
"Artists" entry would be something like:

Code:
--------------------
    
  xx:xx:xx:xx:xx:xx custombrowse browse 0 100 
hierarchy:multilibrary_stereomusic 
multilibrary_stereomusic:multilibrary_stereomusic count:2 level:albums 
itemid:albums itemname:Albums level:artists itemid:artists itemname:Artists
--------------------


Again, we need to look at the "level" and "itemid" to get to the next
level. So we issue the following to list the contents of the "Albums"
menu:

Code:
--------------------
    
  xx:xx:xx:xx:xx:xx custombrowse browse 0 100 
hierarchy:multilibrary_stereomusic,albums 
multilibrary_stereomusic:multilibrary_stereomusic albums:albums
--------------------


And the response to this which contains Album1 and Album2 would be
something like:

Code:
--------------------
    
  xx:xx:xx:xx:xx:xx custombrowse browse 0 100 
hierarchy:multilibrary_stereomusic 
multilibrary_stereomusic:multilibrary_stereomusic,albums 
multilibrary_stereomusic:multilibrary_stereomusic albums:albums count:2 
level:album itemid:1 itemname:Album1 level:album itemid:2 itemname:Album2
--------------------


So the above is basically the command you want, the 0 and 100 numbers
is the start position to return and the number of items to return, so
you can change these to "100 300" to get the next 300 items, or to
something like "0 1000000" to return all items in a single response.

Just for the case of making the sample complete, to get the list of
songs for Album2 we would issue:

Code:
--------------------
    
  xx:xx:xx:xx:xx:xx custombrowse browse 0 100 
hierarchy:multilibrary_stereomusic,albums,album 
multilibrary_stereomusic:multilibrary_stereomusic albums:albums album:2
--------------------


Again, we just add the level to hierarchy and add a level:value
parameter for the new level we like to browse into.

The commands will be exactly the same as long as you don't change the
filenames of the library and menu configurations. This is the case as
long as the command doesn't contain database identifiers, which for
example the last command that lists songs does. But the command for
listing albums in this example is always the same. So due to this, you
wouldn't have to go through this sequence every time, you could issue
the third command directly and get the right response. The sequence in
this case is just needed to get the correct command.

There will also be more result parameters than shown above in a real
situation, but I just shown those I thought was relevant for
understanding.


-- 
erland

Erland Isaksson
'My homepage' (http://erland.homeip.net) 'My download page'
(http://erland.homeip.net/download)
(Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse,
Custom Scan,  Custom Skip, Multi Library and RandomPlayList plugins'
(http://wiki.erland.homeip.net/index.php/Category:SlimServer))
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=35621

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to