Re: Using a custom storage system with the SliMP3?

dean blackketter <dean-qV/[email protected]>
Newsgroups gmane.music.equipment.slimp3.dev
Message-ID <a05100300b7f8a0fe81b1__1597.76454461298$1045920056@[10.0.1.204]>
Hi Jacob,

This is one reason I added the HTTP server to the SliMP3 server.

I have a similar legacy system in my house (tho' it uses a
different file organization.)

You can use your PHP script to access the SliMP3 server via HTTP
and queue up songs, control playback, etc...

If you call the server with a URL like:

http://localhost:9000/status.html

you get back an HTML page with the currently playing status on
it.

But for our applications, you can use a URL like:

http://localhost:9000/status.m3u

you get back an M3U file with the currently playlist in it.

If you send a command to the player like:

http://localhost:9000/playlist.m3u?p1=append&p2=%2fhome%2fjacob%2fmp3%2fA_Song.mp3

it will also return an M3U file (see the playlist.m3u command in
there?) and add the song /home/jacob/mp3/A_Song.mp3 to the
playlist.

The M3U responses also come back with a set of headers that
describe the player's current state. Here's an example of an
HTTP request/response using telnet:

[dean@monkeyhouse SliMP3]$ telnet localhost 9000

Trying 127.0.0.1...

Connected to monkeytank (127.0.0.1).

Escape character is '^]'.

GET /status.m3u http/1.1

HTTP/1.0 200 OK

Content-Type: audio/x-mpegurl

x-playerindex: 1

x-playervolume: 99

x-playertracks: 3

x-playershuffle: 0

x-playerrepeat: 2

x-playermode: play

http://10.0.1.201:8080/jukebox/music/Sade/Lovers%20Rock/01.%20By%20Your%20Side.mp3

http://10.0.1.201:8080/jukebox/music/Sade/Lovers%20Rock/02.%20Flow.mp3

http://10.0.1.201:8080/jukebox/music/Sade/Lovers%20Rock/03.%20King%20Of%20Sorrow.mp3

I haven't really documented (except in the code :-) the command
set, but by browsing the web interface you can cull out examples to
work from. (That's no excuse for missing
documentation...) I have some PHP code that issues the
commands to the player/server. Let me know if you'd like to see
them.

It seems to be pretty stable (my wife didn't even notice that I
replaced the old player with a SliMP3), but if you find a problem let
me know...

-dean

Hi all -

On my
system, I have a somewhat different MP3 storage system. Actual

MP3s are stored in the generic spaces-as-underscores format ("A
Song"

becomes "A_Song.mp3"), but directories are always stored as
'f.'

followed by something, usually a number. ('f.0', 'f.1', etc). The
actual

name of that directory is stored in a file named '.album' along with
the

mp3s or subdirectories. Also, the names of MP3s are stored in

'.indexfile', so that I can see the files in whatever order they were
on

the CD, not just alphabetically.

I have a console-based browser (which calls
mpg123) and PHP web-based

access for this, but how can I tie this in to my SliMP3? (Well, my

SliMP3 emulator, because I don't have a SliMP3). Both the browser
and

the PHP script call a back-end, written in C, that outputs
something

like this:

1 /home/jacob/mp3/A_Song.mp3 "A
Song"

2 /home/jacob/mp3/Another_Song.mp3 "Another Song"

3 f.0/ "A Folder"

(note
that the mp3 names are absolute, the folder names are relative.)

Here's an example tree:

-+ MP3s

|

+- .album

(contains
'Root')

+- .indexfile

(contains 'A_Song.mp3' on line 1, 'Another_Song.mp3'
on line 2)

+- A_Song.mp3

+- Another_Song.mp3

|

+-+ f.0

|

+- .album

(Contains 'A Folder')

+- .indexfile

(contains 'Song_In_Folder.mp3')

+- Song_In_Folder.mp3

To the user, that looks like:

-+ Root

|

+- A Song

+- Another Song

|

+-+ A Folder

|

+ Song In Folder

Any ideas on how I can tie all this into the
SliMP3 server? Thanks!

- Jacob

--

"Terminak #3 has bad keyboard. Pkease fix."

To unsubscribe from this group, send an email to:

[email protected]

Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.