I've never done anything similar, but how are your scripting skills?
A quick poke at the API documentation located at
http://www.subsonic.org/pages/api.jsp shows that there is a command that will do what you want... kind of.
There is a command called "jukeboxControl" that has the capability, but it will take a bit of work...
It has a "skip" command, but it looks to be a "skip to an absolute playlist entry" command, not a "skip ahead/behind" but with a little scripting I'm sure it's possible...
The first thing I would try is to use a referenced based approach to the skip command to see if it works. In a DOS batch file or command prompt, that could be:
- Code: Select all
WGET http://your-server/rest/jukeboxControl.view?u=joe&p=sesame&v=1.5.0&c=myapp&action=skip&id=+1
That may or may not work... it would be nice if it did, because it would be a one line command for your software.
If that does not work, you will have to get the currently playing track, and add or subtract from that...
In it's most basic form, a DOS batch file, I would imagine the following:
- Code: Select all
REM First get the current playlist
WGET http://your-server/rest/jukeboxControl.view?u=joe&p=sesame&v=1.5.0&c=myapp&action=get -output-file=temp.txt
REM Now we need to parse the playlist to find the currently playing item
REM I'd have to see the output file to figure that part out
REM
REM Then we can create a variable, call it @NewID, that is that number + 1
REM Then we issue a skip command using that new ID.
WGET http://your-server/rest/jukeboxControl.view?u=joe&p=sesame&v=1.5.0&c=myapp&action=skip&id=@NewID
I can play more at home to try to bang something together if you don't have any luck...
HTH,
Glenn