Re: [SlimDevices: Plugins] Questions regarding Custom Browse CLI

2007-05-30 Thread erland

barrygordon;205773 Wrote: 
> Erland,
> 
> I just changed my code to use the can custombrowse browse command and
> it works fine.  I did it the way I did since I did not know about "can
> custombrowse browse". Is that documented somewhere under the
> custombrowse plugin wikki, or under slimserver in general?  If so could
> you point me in the general direction?  ThanksThe 'can' command is a standard 
> SlimServer CLI command that works for
all CLI commands, it is documented in the SlimServer CLI documentation.
You will find this in your SlimServer web interface under
"Help/Technical Information/The SlimServer Command Line Interface".

For the Custom Browse CLI you can use it on all available commands, for
example:
can custombrowse browse
can custombrowse play
can custombrowse add
can custombrowse mixes
can custombrowse mix


-- 
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
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Questions regarding Custom Browse CLI

2007-05-30 Thread barrygordon

Erland,

I just changed my code to use the can custombrowse browse command and
it works fine.  I did it the way I did since I did not know about "can
custombrowse browse". Is that documented somewhere under the
custombrowse plugin wikki, or under slimserver in general?  If so could
you point me in the general direction?  Thanks


-- 
barrygordon

barrygordon's Profile: http://forums.slimdevices.com/member.php?userid=7468
View this thread: http://forums.slimdevices.com/showthread.php?t=35621

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Questions regarding Custom Browse CLI

2007-05-30 Thread erland

crwilliams;205750 Wrote: 
> I notice that 'can custombrowse' returns 0.  Should this return 1?
> 
No, but 'can custombrowse browse' should return 1

crwilliams;205750 Wrote: 
> I previously had older versions of CustomBrowse and SlimServer
> installed, could this be the problem?
> I don't think so.

Just to make sure:
- You do use the actual mac address of your SqueezeBox/Transporter
instead of "xx:xx:xx:xx:xx:xx" ?

You could try to enable the debugging parameter in the bottom of the
Custom Browse section of Server Settings/Plugins. This should enable
some debug logging from Custom Browse which you can see in the
SlimServer log file or at http://localhost:9000/log.txt


-- 
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
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Questions regarding Custom Browse CLI

2007-05-30 Thread barrygordon

I am running Custum Browse 1.22.4 and Slimserver 6.5.2 and use the CLI
interface very heavily from touchscreens of my own design(software that
is).  1.22.4 cleared up the only issue I had. Have you checked it and
the wikki for the CLI documentation.  

To startout I issue something like 

SlimPlayers(SMx).id + " custombrowse browse 0 100"

And get back the list of items under the custom browse menu.  I am not
sure what I would get beack if custombrowse was not installed, but I
suspect I would not get any data back, perhaps just the command echo.

I also use multilibrary and have set up one lbrary called Stereo Music.
That is what I get back when I issue the above command. Hope that helps


-- 
barrygordon

barrygordon's Profile: http://forums.slimdevices.com/member.php?userid=7468
View this thread: http://forums.slimdevices.com/showthread.php?t=35621

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Questions regarding Custom Browse CLI

2007-05-30 Thread crwilliams

Hi,

I'm trying to work out how to use the CLI interface to CustomBrowse.  I
am able to use the SlimServer CLI but cannot seem to get the
CustomBrowse CLI to work, based on the examples above.

CustomBrowse and MultiLibrary work fine through the web interface.

I notice that 'can custombrowse' returns 0.  Should this return 1?

I have tried this with CustomBrowse 1.22.4 and SlimServer 6.5.2.

I previously had older versions of CustomBrowse and SlimServer
installed, could this be the problem?

Hope you can advise me.


-- 
crwilliams

crwilliams's Profile: http://forums.slimdevices.com/member.php?userid=11798
View this thread: http://forums.slimdevices.com/showthread.php?t=35621

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Questions regarding Custom Browse CLI

2007-05-27 Thread barrygordon

I have made a lot of progress with the CLI interface and using it from
my touchscreens.  i have now run into a problem That I can not figure
out.

If I submit a "custombrowse add" to add an artist to the playlist, it
works for the first N of my artists. But not for any after them.  What
I have determined (don't know if it is relevant) is that the first
artist it stops working for is on the Second page group of I use the
Web interface of Slimserver. In fact all of the ones it fails for are
not on the first page (Which in my case is artists beginning with the
letter A-G).  I amworking with 1.21.1 I have 109 artists in my stereo
music library.

If I submit "custombrowse add" to add an album to the playlist the
exact same condition occurrs. Works for all albums that are on the
first page when looking at the stereo music library / albums in the
slimserver web interface, but no others.

I have carefully checked what I am submitting it looks good and
coorect.  the sane code build the CLI request for every artis and
similar code for every album.  The differences are in setting up the
hierarchy strings. But as i said before they look good to me.

Would 1.21.3 have a corrrection for this?


-- 
barrygordon

barrygordon's Profile: http://forums.slimdevices.com/member.php?userid=7468
View this thread: http://forums.slimdevices.com/showthread.php?t=35621

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Questions regarding Custom Browse CLI

2007-05-27 Thread erland

barrygordon;204933 Wrote: 
> No you are correct. It was in the level and itemid parameters.  What
> exactly is being encoded %25 would be a % and %20 would be a blank, is
> %2520 a "% " (percent blank)?
The id's are used internally inside Custom Browse and can't contains
spaces and other strange characters, I solved by url encoding them. 
So if you have a file that contains a space, for example:
my library

This will in the id be encoded as:
my%20library

Then when this is sent over CLI it is encoded again, this time it is
the percent character that is encoded, which result in:
my%2520library


-- 
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
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Questions regarding Custom Browse CLI

2007-05-27 Thread barrygordon

No you are correct. It was in the level and itemid parameters.  What
exactly is being encoded %25 would be a % and %20 would be a blank, is
%2520 a "% " (percent blank)?


-- 
barrygordon

barrygordon's Profile: http://forums.slimdevices.com/member.php?userid=7468
View this thread: http://forums.slimdevices.com/showthread.php?t=35621

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Questions regarding Custom Browse CLI

2007-05-27 Thread erland

barrygordon;204842 Wrote: 
> One slight issue but not a problem, if I ask for 10 entries starting at
> location i, I get back some number of entries but generally not 10. I
> get 19, 12, 21, 3, ...  It is not an issue since the count is correct
> and I will increment i by the count as opposed to by 10.It always retrieves 
> all items of the same sorting letter, so it doesn't
stop in the middle of the items starting with an "A" for example. The
reason for this is that the same code is used as for the web interface
where the information is displayed in pages. So basically you will get
one "page" at a time where the page size is specified with the second
number in the CLI command. It will retrieve the number of items you
requested and also add the items up until next page.

barrygordon;204842 Wrote: 
> I also noticed in the URL encoding for a blank within  the name of my
> library I saw %2520 while I was expecting %20Are you sure this was the name ?
The itemid and level parameters might contain %2520 but the itemname
parameter should be encoded as %20, at least that is how it works in my
setup when I use the CLI from a telnet window.


-- 
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
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Questions regarding Custom Browse CLI

2007-05-26 Thread barrygordon

Things are going well.  I can now browse my stereo music for alnums,
artists, genres, etc.

One slight issue but not a problem, if I ask for 10 entries starting at
location i, I get back some number of entries but generally not 10. I
get 19, 12, 21, 3, ...  It is not an issue since the count is correct
and I will increment i by the count as opposed to by 10.

I also noticed in the URL encoding for a blank within  the name of my
library I saw %2520 while I was expecting %20


-- 
barrygordon

barrygordon's Profile: http://forums.slimdevices.com/member.php?userid=7468
View this thread: http://forums.slimdevices.com/showthread.php?t=35621

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Questions regarding Custom Browse CLI

2007-05-26 Thread barrygordon

Thanks.  It is becoming clear to me.  Tomorrow I will play with it.  My
goal is not to blow out any speakers playing encoded tracks through the
analog system


-- 
barrygordon

barrygordon's Profile: http://forums.slimdevices.com/member.php?userid=7468
View this thread: http://forums.slimdevices.com/showthread.php?t=35621

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


[SlimDevices: Plugins] Questions regarding Custom Browse CLI

2007-05-26 Thread erland

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:
And the values after it is: :

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 100" 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
plugins@lists.slimdevices.com
http://list