Implementing playlists

Posted by: pauljlucas

Implementing playlists - 24/03/2003 20:22

I've taken Leigh L. Klotz, Jr's server code and am improving it. One thing is to add playlist support. I'd just like to clear up a couple of things.

My understanding is that playlist 100 is a "master playlist" and contains references to all other playlists, e.g.:

101=PMy Playlist 1
102=PMy Playlist 2
...

Is that right? I've seen request from the Rio (running the stock client) for "/tags/100". Does that mean it wants ALL the tags for ALL tracks? I've also occasionally seen "/tags/0" but don't know what the Rio wants.

I've also seen "/list/100". Does that mean the Rio wants ALL track ID info for ALL tracks?

Thanks.
Posted by: peter

Re: Implementing playlists - 25/03/2003 03:18

My understanding is that playlist 100 is a "master playlist" and contains references to all other playlists

Yup.

I've seen request from the Rio (running the stock client) for "/tags/100". Does that mean it wants ALL the tags for ALL tracks?

No, just the tags for the "master playlist" (of which it probably uses just the name and the length).

I've also seen "/list/100". Does that mean the Rio wants ALL track ID info for ALL tracks?

No, just for the direct children of the master playlist, i.e. all the other playlists (not tracks).

Peter
Posted by: Roger

Re: Implementing playlists - 25/03/2003 03:32

No, just for the direct children of the master playlist, i.e. all the other playlists (not tracks).

Bzzzzt. Wrong. /content/100 lists the immediate children of the root playlist. /list/100 lists all of the descendants of the root playlist -- i.e. it recursively flattens the list.
Posted by: pauljlucas

Re: Implementing playlists - 25/03/2003 09:57

During recursive descent, does it return the intermediate playlist info or just the tracks?

For example:

100
P1
T1
T2
P2
T3

For that structure, does the Rio expect:

P1 T1 T2 P2 T3

i.e., playlist info included or just:

T1 T2 T3

just the tracks?
Posted by: Roger

Re: Implementing playlists - 25/03/2003 10:55

"Just the tracks, ma'am" -- Joe Friday, Dragnet (paraphrased)

Posted by: pauljlucas

Re: Implementing playlists - 25/03/2003 11:58

OK, I have it almost working. When I select "Playlists" via the top-level music selection, I see a list of playlists. The Rio did a /list/100 followed by a /tags/100. When I select a playlist, say 104, it does a /tags/104 but it complains that "The item is not a playlist." The contents of file 104 are like:

4001=TTrack 1
4002=TTrack 2
...

i.e., the tracks that comprise that playlist. I send it the binary-encoded version of that. Why does it want yet-another playlist? Presumeably the list of playlists has to eventually end up with a list of tracks.

What am I missing?
Posted by: pauljlucas

Re: Implementing playlists - 25/03/2003 23:52

OK, I figured it out. Playlists now work. I'll post a message here when my server code is fully ready. Thanks for all the help.