Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#271496 - 06/12/2005 02:33 Empeg XML Playlist - halfway to EWL party interface
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Ok, I got sidetracked while working on my Bluetooth project to take a look at the web party interface and what kind of work it would take to make it a reality. One thing is missing to make the party interface work, and that is a list of the current running order - a before and next view on steroids, basically. That data exists on the dynamic data partition, and I got some code from tonyc a while ago to pull fids out from it. THAT gave me the idea of creating a web service on the Empeg to output a list of tracks in XML based upon a track number. The idea is this:

Read /proc/empeg_notify to find out what track number we are on (notify_Track)
Pass that track on to the web service, which gives an XML representation of the current running order
Integrate the current running order into the Empeg Web Lite interface

So I wrote the web service. This is attached, it's called xmlplaylist. Please consider this a pre-alpha, it hasn't been tested a lot because of reasons I'll go into later. The binary should be run from telnetd while the player is running. After starting the program, point your web browser to:

http://empeg:8080/?track=0&len=20&prev=4

and you will get an XML file representing the first 20 tracks of your current running order. len tells the service how many tracks to get back, and prev tells it how many tracks to get before the current track (to show a few tunes before the currently playing one).

Here's the problem.

I can't use it like it is in EWL because of Mozilla's Same Origin policy. This is a good thing for Mozilla users, bad for my web interface. It basically says a script on http://empeg/ will NEVER have permission to access data coming from http://empeg:8080/ because they are different websites. I have the data, but I can't use it.

Any suggestions?


Attachments
271495-xmlplaylist.zip (512 downloads)

_________________________
Mark Cushman

Top
#271497 - 06/12/2005 03:25 Re: Empeg XML Playlist - halfway to EWL party interface [Re: cushman]
JBjorgen
carpal tunnel

Registered: 19/01/2002
Posts: 3584
Loc: Columbus, OH
Quote:
Any suggestions?

Beg Mark to include it in khttpd?
_________________________
~ John

Top
#271498 - 06/12/2005 12:21 Re: Empeg XML Playlist - halfway to EWL party interface [Re: cushman]
SE_Sport_Driver
carpal tunnel

Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
Just in time for some Christmas and New Year's parties!
_________________________
Brad B.

Top
#271499 - 06/12/2005 12:44 Re: Empeg XML Playlist - halfway to EWL party interface [Re: cushman]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
I thnk that having access to the current running order from khttpd on the empeg would be a Good Thing(tm), and I'm willing to add such to Hijack.

I'm thinking of perhaps a "playlist" view, similar in formatting/XML to existing Hijack playlist views, except this one is special for the current running order.

I wonder if it should only show the next "n" tracks, though, where "n" is TBD or a parameter?

Cheers

Top
#271500 - 06/12/2005 13:32 Re: Empeg XML Playlist - halfway to EWL party interface [Re: mlord]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Quote:
I thnk that having access to the current running order from khttpd on the empeg would be a Good Thing(tm), and I'm willing to add such to Hijack.

Awesome!

Quote:
I'm thinking of perhaps a "playlist" view, similar in formatting/XML to existing Hijack playlist views, except this one is special for the current running order.

It can be formatted in any way. In the zip file I attached above I included sample output for how I formatted the output. As long as it's XML it doesn't matter too much, just as long as all the data is there. The only differences from the playlist view is that each track in the running order has a track number.

Quote:
I wonder if it should only show the next "n" tracks, though, where "n" is TBD or a parameter?

A parameter I think would be best. That way you request and get back the exact number of tracks you need. Since you have to get the tags from disk for each track it probably cuts down on disk I/O, too. It would be preferable also to be able to show x tracks before the current track, to show a Now and Next view. "Give me X tracks starting at track T" would be best, that way we could scroll forward and backwards through the entire running order (could be slow, though).

My intention for the web interface would be to only update the running order on screen if A. The current track changes or B. The total running order length changes. This makes it so I only have to monitor /proc/empeg_notify for state changes and probably update the running order list only once per song. If an insert/append/enqueue/replace happens, this would trigger an update because the running order length would change, but a tweak order would not (unless it happens through the web interface).

This would rock, Mark! If you add this to Hijack, I'll make you your "entire remote" web interface widget.
_________________________
Mark Cushman

Top
#271501 - 06/12/2005 14:13 Re: Empeg XML Playlist - halfway to EWL party interface [Re: cushman]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Okay, sounds good. I'll put it in the queue for the Christmas "break" -- just got a phone call here from a client willing to pay double+ if I can fit his stuff into this week with the other contracts I'm already busy on..

Cheers

Top
#271502 - 06/12/2005 18:38 Re: Empeg XML Playlist - halfway to EWL party interface [Re: mlord]
JBjorgen
carpal tunnel

Registered: 19/01/2002
Posts: 3584
Loc: Columbus, OH
Quote:
just got a phone call here from a client willing to pay double+...


note to self: I need to become a highly in-demand kernel hacker when I grow up.
_________________________
~ John

Top
#271503 - 07/12/2005 09:32 Re: Empeg XML Playlist - halfway to EWL party interface [Re: JBjorgen]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
...wait for it...
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#271504 - 11/12/2005 00:12 Re: Empeg XML Playlist - halfway to EWL party interface [Re: mlord]
SE_Sport_Driver
carpal tunnel

Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
Quote:
Okay, sounds good. I'll put it in the queue for the Christmas "break"


Mark, I think you should take the next 15 days off ! You've deserved it!
_________________________
Brad B.

Top
#271505 - 15/12/2005 01:05 Re: Empeg XML Playlist - halfway to EWL party interface [Re: pgrzelak]
AndrewT
old hand

Registered: 16/02/2002
Posts: 867
Loc: Oxford, UK
Quote:
...wait for it...
I'm worried, perhaps he's not very well ATM?

Top
#271506 - 15/05/2007 22:14 Re: Empeg XML Playlist - halfway to EWL party interface [Re: cushman]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
I made a start on this tonight, but have run out of time.

Nag me again in a couple of weeks to finish it.

Cheers

Top
#271507 - 20/07/2007 14:40 Re: Empeg XML Playlist - halfway to EWL party interface [Re: mlord]
mp3freak
new poster

Registered: 20/09/2001
Posts: 17
Loc: Seattle, WA.. USA
Hi Mark,

I'll provide the nagging, personally I'd love this functionality and can't wait to use it!

Thanks much, John

Top
#271508 - 12/08/2007 04:15 Re: Empeg XML Playlist - halfway to EWL party interface [Re: mp3freak]
techtom
journeyman

Registered: 30/12/2002
Posts: 51
Loc: Southern California
Since I've been working in the kernel on my Seeburg driver, I'm interesed in helpling out on the XML playlist in EWL. I probably cannot port Cushman's code into hijack. But I was thinking it might be possible to add the dynamic data as a /proc entry using the file /proc/empeg_playlist.

I've patched my source tree to the latest v77 version and I've looked at the code so I have some idea of how to add the /proc entry. But I have no XML knowledge, so I wouldn't be able to modify EWL to add playlist support.

The /proc/empeg_playlist could be implemented in two ways: 1)return the raw bytes of the playlist from the dynamic data partition. 2) have /proc/empeg_playlist return xml data for the entire playlist. "Track" from /proc/empeg_notify, would identify which item in the playlist was currently playing.

Thoughts/Comments...

-Techtom

Top
#271509 - 18/08/2007 13:00 Re: Empeg XML Playlist - halfway to EWL party interface [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Quote:
I made a start on this tonight, but have run out of time.

Nag me again in a couple of weeks to finish it.


Well, it was more like a couple of months than weeks, but it's here now: v478.
Nagging no longer required.

-ml


Edited by mlord (18/08/2007 13:15)

Top