PDA

View Full Version : Controlling Server with Other App in MacOS X



Bob Stern
2008-07-28, 18:10
Instead of using the SlimServer database, if I create my own music database in some other application (eg, FileMaker), is there a protocol for another app to send commands to SlimServer to play a specified list of music files that are not stored in the SlimServer database?

(Should I move this question to a different forum?)

pfarrell
2008-07-28, 18:29
Bob Stern wrote:
> Instead of using the SlimServer database, if I create my own music
> database in some other application (eg, FileMaker), is there a protocol
> for another app to send commands to SlimServer to play a specified list
> of music files that are not stored in the SlimServer database?

Can you be a bit more specific?
The SqueezeCenter database does not contain the music, those bits live
in files on your disk. The database contains artist/album/song data,
more precisely, meta data, data about the music.

The SqueezeCenter uses its database of metadata to know what to stream
to the SqueezeBox/Receiver/Transporter.

Playlists are separate, they are just lists of files to play. Its easy
to make playlists with nearly anything and have the SqueezeCenter play
the songs that are living in the disk structure that the SqueezeCenter
knows about.



--
Pat Farrell
http://www.pfarrell.com/

Bob Stern
2008-07-28, 18:48
Perhaps what I need to do is command SlimServer (programmatically, not via the GUI) to add several music files to its database, create a playlist containing those files, and then play the playlist.

Is this documented somewhere?

When I'm done listening to this playlist, I expect I'd want to delete the playlist (and perhaps even the pointers to the files) from the SlimServer database.

Thanks, Pat!

pfarrell
2008-07-28, 19:08
Bob Stern wrote:
> Perhaps what I need to do is command SlimServer (programmatically, not
> via the GUI) to add several music files to its database, create a
> playlist containing those files, and then play the playlist.

I'm not sure you are using playlist the same way that the SqueezeCenter
Do you mean a selection? or do you really mean a playlist (m3u file)?



> Is this documented somewhere?

The "command line interface" can be use programatically by any
programming language.

Its documented in the SC help,
http://<schost>:9000/html/docs/help.html


> When I'm done listening to this playlist, I expect I'd want to delete
> the playlist (and perhaps even the pointers to the files) from the
> SlimServer database.

Why would you want to do this? Again, you can 'rescan' the library, but
I don't see any reason to remove the songs from the database.

I can't see any downside from having the tunes in the database



--
Pat Farrell
http://www.pfarrell.com/

Bob Stern
2008-07-29, 15:27
Thanks for pointing me to the command line documentation. I see that the command repertoire is quite extensive and will do everything I need.

The reason I want to use external database software to control SlimServer rather than the built-in database is that all my music is classical, which raises some complications. One is that I usually want to consider a multi-track composition to be the basic unit of what I select to play, rather than considering each track as a separately selectable piece of music. A composition is not an entire album (CD), as there can be 2 or 3 compositions on one album. Another complication is that I need a way to distinguish among multiple recordings of the same composition, often with overlap in the performers.

Perhaps I could use the "album" tag to uniquely identify a specific recording of a specific composition rather than an entire physical CD, but it would be tricky to define in a way that is guaranteed to be unique yet is still understandable. An external database gives me more flexibility to use hidden unique key fields.

Returning to the command line issue, I thought one method of playing a multi-track classical composition would be to write software that commands SlimServer to create a playlist populated by the tracks of the composition I want to play now. When I decide to play a second composition, the software would command SlimServer to clear the playlist and repopulate it with the tracks of the second composition. Am I overlooking a much simpler approach?

In the command line documentation, I don't see any commands that refer to a "selection" of tracks other than a playlist, so it looks like populating a playlist is the only way to command SlimServer to play several tracks in sequence without pause.

aubuti
2008-07-29, 15:54
Perhaps I could use the "album" tag to uniquely identify a specific recording of a specific composition rather than an entire physical CD, but it would be tricky to define in a way that is guaranteed to be unique yet is still understandable. An external database gives me more flexibility to use hidden unique key fields.

Returning to the command line issue, I thought one method of playing a multi-track classical composition would be to write software that commands SlimServer to create a playlist populated by the tracks of the composition I want to play now. When I decide to play a second composition, the software would command SlimServer to clear the playlist and repopulate it with the tracks of the second composition. Am I overlooking a much simpler approach?
It's true that current tagging systems are poorly suited for classical, but if you haven't done so already, take a look at the wiki pages on tagging classical music (http://wiki.slimdevices.com/index.php/Beginners_Guide_To_Classical). Only a small part of my collection is classical, but I use the album=composition approach and it works well for me. I add enough other info (orchestra, soloist, conductor, etc.) to the album title to be able to separate out different performances of the same work.

If you can bend the tags to your needs, then playing a composition is as simple as selecting an "album" (=composition) and hitting the play button. When it's time for the 2nd composition, select that "album" and hit play.

And don't forget that if you write the custom software to do this, you'll also need to deal with the codes from the remote. Because you don't want to listen to all that classical music sitting in front of your computer, or running back and forth to it ;o)