#73678 - 21/02/2002 10:31
Hijack v201 Released
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Hijack v201 is now available (from the link at top right).
This version features:
Hijack now correctly handles LARGE config.ini files. But please note that the player software does not handle them well: it will read only the tail end of the file, modulo 4096. This means that if your config.ini file is 4097 bytes long, the player software will read only the final byte. This happens whether or not you have Hijack installed. I suppose I might try to add code to nuke all of the non-player stuff from the file to help out the player, but even that would not be simple because the player checks the filesize before computing how much to read. Ugly bug.
non-TCP packets are now allowed on port 8300, which should allow the empeg "find" broadcasts to work even with "disable_emplode=1".
The HOME/WORK menu selections now have nice pretty rounded corners.
Christian Hack's v1.0 DelayTime patch has been added, with slight changes. This is only temporary, as I'm not 100% happy with it yet. But I suppose Christian will fix it up soon now that it's in there. It needs two things: (1) more intuitive interface (a slider?), and (2) much more efficient code in empeg_audio3.c, which is currently a huge CPU hog. But it does work, and it works well! Nice job, Christian!
That's all I've time for at the moment. Got a ton of catching up to do now -- you folks have been very busy for the past week!
Cheers
-ml
|
Top
|
|
|
|
#73679 - 21/02/2002 10:36
Re: Hijack v201 Released
[Re: mlord]
|
enthusiast
Registered: 28/01/2002
Posts: 265
Loc: MI, USA
|
YEA!!!! WOOHOO!!! YIPPEE!!!!
and there was much rejoicing
_________________________
guardian__J MKIIa 20g Smoke
|
Top
|
|
|
|
#73680 - 21/02/2002 11:11
Re: Hijack v201 Released
[Re: mlord]
|
carpal tunnel
Registered: 23/08/2000
Posts: 3826
Loc: SLC, UT, USA
|
Heya Mark, once you done going through the thousands of posts you missed in the past week, could you give what i've written up in the Hijack Faq a once over and see if you spot any mistakes or left out options? Thanks!
|
Top
|
|
|
|
#73681 - 21/02/2002 11:25
Re: Hijack v201 Released
[Re: loren]
|
member
Registered: 19/12/2001
Posts: 108
|
Loren,
One thing I was going to mention about the disable_emplode=1 config.ini setting... You have:
Disallows emplode access completely. Blocks TCP port 8300 (Emplode/Emptool)
NOTE! - if ;@WORK (or other modifier) is left off, you'll have to FTP or revert to older kernal to turn this option off!!
I think that's a little overstated. It doesn't completely block emplode access. Emplode will still work over the serial port, or USB. You wouldn't necessarily have to ftp or revert to an old kernel to turn that off.
Might be better to just say it disables ethernet emplode access.
Chris
|
Top
|
|
|
|
#73682 - 21/02/2002 11:35
Re: Hijack v201 Released
[Re: crocklobster]
|
carpal tunnel
Registered: 23/08/2000
Posts: 3826
Loc: SLC, UT, USA
|
Hrm. I copied that statement over from one of Mark's posts... but it sounds like you'd be correct on that one. Mark?
|
Top
|
|
|
|
#73683 - 21/02/2002 11:45
Re: Hijack v201 Released
[Re: mlord]
|
member
Registered: 19/12/2001
Posts: 108
|
Mark,
Glad to see you're back. I actually started getting antsy and started looking at the source code to see if I could figure out how to support xml output. I see where some of the playlist stuff is built up, and figured I could copy, edit, and paste to get the xml to work. Alas, I couldn't figure out the mechanism for branching the logic for xml. For instance, if I request /fids/101?.xml, I wasn't sure how to make it send back a new structure.
Anyway, I would have loved to do this myself, but since you're back...
When you get a chance, could you take a look at this thread for a pretty complete description of what we're thinking as far as the xml goes?
Let me know if I can be of any help. In fact, if you give me just a hint or two, I might be able to do this myself.
Oh, and while you're thinking about allowing .html files to be downloaded while khhtpd_files=0, maybe .xml and .xslt files too? Actually, maybe a more extensible security model would be cool. In fact, I know it would cool, question is, how much work is it? It would be nice to be able to say what file extensions are allowed / disallowed as well as paths that are allowed / disallowed.
Chris
P.S. I'm visiting PayPal right now
|
Top
|
|
|
|
#73684 - 21/02/2002 12:02
Re: Hijack v201 Released
[Re: loren]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
He's right about that, it only blocks ethernet access to Emplode.
Also:
please use either "hilite" (USA) or "highlight" (English), not "highlite" (neither) in the descriptions.
"supress_notify=1" belongs under "[hijack]", not "[output]"
The countdown timer increment is actually variable, rather than a 15-second constant.. best just to not mention the increment.
The real purposes of "fake_tuner" are (1) to allow people to see what the tuner functionality looks like (display, menus, etc..) before purchasing an expensive tuner module, and (2) to allow use of the "PrevVisual" button translation (coming soon in Hijack), which only works via the tuner interface.
Pressing "4" on the remote will cancel the "CountDown Timer" (with a confirmation tone and popup) if it was already running.
menu_remove will work even for "Home/Work" on the menu.
"rioremote_disabled=1" no longer exists.
"rootdir_dotdot=1" causes '..' to appear in FTP/HTTP directory listings of "/" (the top-level directory)
The two "_show_dotfiles" options apply to ALL directories, not just the rootdir.
".U" and ".N" are no longer accepted on left of '=' in ir_translate. Note also, that there actually was/is another '.N' which still works to left of '=', meaning "Not-shifted" (the opposite of .S).
Under "Verifying Translations", Hijack no longer dumps out the working translations; instead it dumps out the ones in ERROR, and pops up a window at startup to indicate errors.
The Left/Right time delay thingie is now in v201.
That'll do for now. I didn't really read the ir_translate section in much detail, but note that "button names" should be working at least as well as "hex codes", and I'd prefer that the names be used where possible.
Cheers
-ml
|
Top
|
|
|
|
#73685 - 21/02/2002 12:21
Re: Hijack v201 Released
[Re: mlord]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
|
The Left/Right time delay thingie is now in v201.
And quite cool it is. I did not try it in its earlier incarnations, but just for the heck of it, when I installed 201 I checked it out on headphones. Amazing. Good job to everyone involved in coding that one up.
|
Top
|
|
|
|
#73686 - 21/02/2002 12:47
Re: Hijack v201 Released
[Re: crocklobster]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
What is an ".xsl" file? And what mime-type ("Content-Type:") should be used for one?
As I've noted in the other thread, can you email me a detailed set of instructions as to exactly what you want Hijack to do for this? I'm pretty out of date on .css/xml/xsl etc..
As I get it right now, we'd like a "?.xml" (or something) extension to just send the FID tag info in a particular format, right? Details please.
The better your instructions, the quicker it happens. Thanks!
-ml
|
Top
|
|
|
|
#73687 - 21/02/2002 12:49
Re: Hijack v201 Released
[Re: mlord]
|
carpal tunnel
Registered: 23/08/2000
Posts: 3826
Loc: SLC, UT, USA
|
Awesome. Thanks for all the clarifications... mashing all the info together from tons of posts obviously resulted in some mistakes. I made the appropriate changes in the FAQ.
Stuff I'm not clear on:
When you say:
The countdown timer increment is actually variable, rather than a 15-second constant.. best just to not mention the increment.
... are you referring to the Screen Blanker Timeout? 'Cause I can't find anywhere i've mentioned Countdown Timer Timeout as being 15-seconds.
You said there's another .N modifier that works only on the left of the = sign that means "not-shifted".
So the .N modifier means different things depending on which side of the = it's on? Confusin' i says. Could ya change one or the other to a different modifier so it's more obvious? Or should i just define the .N as both.
Thanks again!
|
Top
|
|
|
|
#73688 - 21/02/2002 13:00
Re: Hijack v201 Released
[Re: loren]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
.N to the left of the = means Not shifted (opposite of .S).
.N to the right of the = means menus Not active (opposite of .U).
Basically, I goofed when added .U/ .N, in that I missed the fact that .N was already used..
The 15-second thing I referred to was for the "Countdown Timer Timeout", aka "QuickTimer" (same thing). I didn't read your FAQ enough the first time, so what you have there is mostly correct. But the actual increments for the intervals are even more complex than the FAQ says.. and the whole deal sounds way more complex than the function actually is when used.. might be better to just not talk about the increments at all.
Cheers
|
Top
|
|
|
|
#73689 - 21/02/2002 13:05
Re: Hijack v201 Released
[Re: mlord]
|
carpal tunnel
Registered: 23/08/2000
Posts: 3826
Loc: SLC, UT, USA
|
Cool. I'll add that to the FAQ after lunch, and yeah... i'll take the increments stuff out. I just had fun figuring it out so i stuck it in =]
|
Top
|
|
|
|
#73690 - 21/02/2002 13:27
.xml output?
[Re: crocklobster]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
I'm looking at the .xml stuff right now, and the first question I have is:
I notice that the .xml seems to be split into two sections, one for playlists and one for Tunes. Everything looks trivial except for this. Do we need this?
Thanks
|
Top
|
|
|
|
#73691 - 21/02/2002 13:56
Re: .xml output?
[Re: mlord]
|
member
Registered: 19/12/2001
Posts: 108
|
Not really. We could have everything be in one list, tunes and playlists, as long as they were identified somehow, like a <type> tag under each "item".
I'll get together with you on this though email.
Chris
|
Top
|
|
|
|
#73692 - 21/02/2002 17:20
Re: Hijack v201 Released
[Re: mlord]
|
pooh-bah
Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
|
Any reason why the patch got a lot smaller? Used to be about 341000 bytes, now it's only 305000 odd bytes.
How did you work out that the code was a CPU hog? I didn't notice a huge increase in the load averages which was unexpected (like my comment says). I can't think of much to make it more efficient short of doing it in assembler which is definitely an option
_________________________
Christian #40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)
|
Top
|
|
|
|
#73693 - 21/02/2002 18:02
Re: Hijack v201 Released
[Re: Shonky]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
>Any reason why the patch got a lot smaller?
>Used to be about 341000 bytes, now it's only 305000 odd bytes.
Every now and then I look at the patchfile content and notice some crud and remove it. In this case, it had some unnecessary ".orig" files in it.
>I can't think of much to make it more efficient..
How about removing the "copy_from_user()" and "memcpy()" calls from within that central loop.. looks pretty darned slow to me. Much better would be to just do one or two calls to those routines, and then have the loop unroll whatever it needs (if anything) without any slowish function calls inside the loop. Basic stuff.
Cheers
|
Top
|
|
|
|
#73694 - 21/02/2002 18:13
Hijack v202: First crack at XML
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Okay, Hijack v202 now has:
?.xml support for playlists; looks for "/default.xsl" for formatting info, or whatever is specified by [hijack] khttpd_xsl=xxxx in config.ini (must be in rootdir, don't specify a path, and leave off the .xsl extension!). To get xml to work, the server converts any <, >, or ? characters into plus signs (+) in the title, artist, source and comment fields. Alternative suggestions are welcome.
When using "khttpd_files=0", the server now allows access to any files ending in .htm, .html, .jpg, .png, .xsl, and/or .css
the basic "buttonhack" code is now included for turning on illuminated buttons installed from Brian's kit.
|
Top
|
|
|
|
#73695 - 21/02/2002 18:14
Re: Hijack v201 Released
[Re: mlord]
|
pooh-bah
Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
|
Yeah but because the samples go left1 right1 left2 right2 etc rather than left1 left2 .. leftx right1 right2 ... rightx, I have to do it sample by sample unfortunately.
I think you may be misunderstanding how it's done.
_________________________
Christian #40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)
|
Top
|
|
|
|
#73696 - 21/02/2002 18:15
Re: Hijack v201 Released
[Re: Shonky]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Yes, I see it has to be sample by sample, but the code can be rewritten to avoid those SLOW function calls from within the inner loop.
-ml
|
Top
|
|
|
|
#73697 - 21/02/2002 19:05
Re: Hijack v202: First crack at XML
[Re: mlord]
|
old hand
Registered: 30/04/2001
Posts: 745
Loc: In The Village or sometimes: A...
|
Mark,
you can replace any 'reserved' XML characters (like <,> and ?) with their HTML escaped equivalent (which is in the form of '&' symbolic-character name followed by a semicolon ';'.) as follows:
< should be output as <
> should be output as >
and of course, you need to escape the escape character (&), and this
is done as follows:
& should be output as &
I am not sure what '?' should be escaped as, but perhaps someone else can advise us,
for now escape the ? as a + symbol and be done with it.
the others should be escaped as indicated above.
|
Top
|
|
|
|
#73698 - 21/02/2002 21:43
Re: Hijack v202: First crack at XML
[Re: number6]
|
member
Registered: 19/12/2001
Posts: 108
|
I'm guessing Mark meant '&' and not '?'.
I tried a ? in the title of a tune, and it works properly. The other special characters you mentioned should definitely be escaped as you pointed out.
Here is a zip file with three sample stylesheets and some images. Some of this is adapted from Beaker's earlier post in another thread. Put the contents of this zipfile in your root directory, and rename the desired stylesheet to default.xsl
You can see, two of them use the XSLT 1.0 spec and one uses the Working Draft spec. Upgrade your browser or XML parser to be able to use the 1.0 xslt spec. My guess is more stylesheets will be written to that spec as there are more native functions, so it's easier to do a lot of stuff.
Mark, thanks for your efforts here. It works well. I guess I might have one request... The ability to override the default config.ini stylesheet. I was thinking if could be passed along with the quesry string. http://10.1.5.30/drive0/fids/101?.xml&xslt=newsheet.xsl or whatever. Is this doable?
Great stuff. Let's bust out some cool stylesheets.
Chris
Attachments
71755-empegxml.zip (27 downloads)
|
Top
|
|
|
|
#73699 - 21/02/2002 23:17
Re: Hijack v202: First crack at XML
[Re: crocklobster]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Hmm I couldn't figure this stuff out. I put the files in my root directory and named one of them "default.xsl".. Now what? I browse to my root directory and things still look normal. When I open the XSL files in my browser I see the pretty pictures and some things that look like table headers, but that's about it... Plus some messy looking stuff like:
Tags Tune ?.m3u ?SERIAL=%23.xml Tags Tune
I guess the idea is to show the directory listings in a nicer style, but it's not working for me.. Must be doing something wrong.
|
Top
|
|
|
|
#73701 - 22/02/2002 07:10
Re: Hijack v202: First crack at XML
[Re: tonyc]
|
member
Registered: 19/12/2001
Posts: 108
|
Well, firstly, it's very possible that it's working. The two default - *.xsl stylesheets were made to duplicate the current functionality of the html. They were made as a baseline, so people could see the xslt that designs the current layout, and hopefully would be able to change things easily themselves.
Now, if you still think you're having a problem (or if anyone else is)...
Which browser do you have, and which stylesheet did you rename to default.xsl
If you have IE 5 or 5.5 and have not upgraded your XML parser to 3.0 in "replace" mode, use the "Working Draft" stylesheet. I think it was named default - WD.xsl
If you are using Mozilla, IE 6, or IE 5 / 5.5 with MSXML 3.0 in "replace" mode, use either the default - 1.0.xsl or default - alt colours - 1.0.xsl stylesheet.
Andy had some links for upgrading your xml parser here. You can also find some good info at netcrucible for msxml questions.
|
Top
|
|
|
|
#73702 - 22/02/2002 07:39
Re: Hijack v202: First crack at XML
[Re: mlord]
|
member
Registered: 19/12/2001
Posts: 108
|
Not sure the downloading of .xsl files when khttpd_files=0 is working correctly. I tried it on my work player today, and since it was in ;@WORK mode, kttpd_files=0. I got a 403 when I tried to get the .xsl file. When I switched to ;@HOME mode, it worked properly.
Chris
|
Top
|
|
|
|
#73703 - 22/02/2002 08:17
Re: Hijack v202: First crack at XML
[Re: crocklobster]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Yup, .xsl is missing from the exclusion list.
It'll work in v203 (see notice elsewhere, in a few minutes).
-ml
|
Top
|
|
|
|
#73704 - 22/02/2002 08:46
Hijack v203/v204: more xml hacking
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Okay, Hijack v203/v204 are out.
These versions only have changes to the XML generation. For the uninitiated, this XML stuff is the foundation by which one can create/use "skins" for the Hijack playlist browser.
New in v203:
.xsl files can now be accessed even when the khttpd_files=0 restriction is in effect (this got left out by accident from v202).
The internal tag name for the xml is now "playlist" instead of the rootname of the .xsl file ("default").
As of v204, khttpd_xsl=xxxxx is renamed to khttpd_style=xxxxx
The khttpd_style=xxxxxx config.ini parameter is now a full pathname (with extension) of the xsl template (style sheet). The default style sheet is still /default.xsl
The default (or configured) style sheet can be overridden on a per-request basis with in the URL, using this (quirky) syntax:
http://my.empeg/drive0/fids/101?STYLE=/path/stylesheet.xsl.xml Of course, this breaks (the few) existing style sheets, but also leaves things in better shape for the future (I think).
Cheers
|
Top
|
|
|
|
#73705 - 22/02/2002 09:05
Re: Hijack v202: First crack at XML
[Re: crocklobster]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Can you get style sheets to work with v204 ??
I renamed the tag from "default" to "playlist", and now I cannot get it to work for me. But then, I know almost nothing about .xsl files.
??
|
Top
|
|
|
|
#73706 - 22/02/2002 09:48
Re: Hijack v202: First crack at XML
[Re: mlord]
|
carpal tunnel
Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
|
This is what I got on IE6, on http://my.empeg/drive0/fids/101?STYLE=/path/stylesheet.xsl.xml
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
The stylesheet does not contain a document element. The stylesheet may be empty, or it may not be a well-formed XML document.
Sorry, I forgot to mention: v.204
Edited by taym (22/02/2002 09:48)
_________________________
= Taym = MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg
|
Top
|
|
|
|
#73707 - 22/02/2002 10:07
Re: Hijack v202: First crack at XML
[Re: mlord]
|
enthusiast
Registered: 28/01/2002
Posts: 265
Loc: MI, USA
|
I installed 204 and didn't add any other files to the empeg but I got this error:
A semi colon character was expected. Error processing resource 'http://empegjohn.qdi.com/drive0/fids/101?.xml'. Line 114, Position 14
<genre>R&B</genre>
-------------^
is that because of the &? I thought that was fixed...maybe not in genre?
EDIT: in IE the arrow looks like it's pointing at the < in </genre>
Edited by guardian__J (22/02/2002 10:08)
_________________________
guardian__J MKIIa 20g Smoke
|
Top
|
|
|
|
#73708 - 22/02/2002 10:13
Re: Hijack v202: First crack at XML
[Re: mlord]
|
member
Registered: 19/12/2001
Posts: 108
|
Here are the updated stylesheets to reflect the root tag being named <playlist>
Attachments
71857-empegxml.zip (25 downloads)
|
Top
|
|
|
|
#73709 - 22/02/2002 10:18
Re: Hijack v202: First crack at XML
[Re: guardian__J]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Yes, I didn't know that '&' was valid in genre -- v205 will handle it there also.
-ml
|
Top
|
|
|
|
#73710 - 22/02/2002 10:21
Re: Hijack v202: First crack at XML
[Re: mlord]
|
enthusiast
Registered: 28/01/2002
Posts: 265
Loc: MI, USA
|
THANK YOU!!!
what account should I use to paypal with a CC?
_________________________
guardian__J MKIIa 20g Smoke
|
Top
|
|
|
|
#73711 - 22/02/2002 10:30
Re: Hijack v202: First crack at XML
[Re: mlord]
|
member
Registered: 19/12/2001
Posts: 108
|
So far, this is totally awesome. I'm thinking up some ideas for hosting stylesheets and a navigation scheme where people would be able to test stylesheets at their whim.
For what I'm thinking, the path to the current stylesheet, passed in with the xml would be great. Here's the current problem:
If I put in http://10.1.5.30/drive0/fids/101?STYLE=/default%20-%20alt%20colours%20-%201.0.xsl.xml it works fine on that playlist. The problem is all the <a> tags that navigate to other playlists assume that it can just send a request for say, http://10.1.5.30/drive0/fids/7e21?.xml and that only works if it's the defaulted stylesheet. If you could send down, as an attribute on the <playlist> tag, the path and name of the current stylesheet, I could use that to build the links to the other playlists.
So, if the stylesheet requested is the "default" one, send
<playlist stylesheet="" ....>
if the stylesheet has been specified send down
<playlist stylesheet="STYLE=/path/stylesheetname.xsl" ...>
What do you think?
Chris
|
Top
|
|
|
|
#73712 - 22/02/2002 10:30
Re: Hijack v202: First crack at XML
[Re: guardian__J]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
|
Top
|
|
|
|
#73713 - 22/02/2002 10:33
Re: Hijack v202: First crack at XML
[Re: crocklobster]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Okay. In v205 (later this afternoon).
Also, what mime-type should the httpd use when serving the .xsl file? It currently sends "text/xsl", but the info I have from Sun suggests "text/html". Neither of these work with Mozilla, though.
Mmm..
|
Top
|
|
|
|
#73714 - 22/02/2002 10:37
Re: Hijack v202: First crack at XML
[Re: crocklobster]
|
enthusiast
Registered: 28/01/2002
Posts: 265
Loc: MI, USA
|
crocklobster:
I was wondering if there is a way for the xml/xsl to determine which option are available and not display them when they are not. I thinking about how Hijack used to hide play and tag when those options where unavailable...is there any way to accomplish this with the current scheme?
_________________________
guardian__J MKIIa 20g Smoke
|
Top
|
|
|
|
#73715 - 22/02/2002 10:38
Re: Hijack v202: First crack at XML
[Re: crocklobster]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Just to make my life easier, the stylesheet="xxxxxxx" thingie will always be present, even for the default xsl. Okay?
|
Top
|
|
|
|
#73716 - 22/02/2002 10:40
Re: Hijack v202: First crack at XML
[Re: guardian__J]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
I could add them as top level tags, if that would help. As in
<playlist files="0" commands="1" stylesheet="/default.xsl" ...>
Edited by mlord (22/02/2002 10:43)
|
Top
|
|
|
|
#73717 - 22/02/2002 10:48
Re: Hijack v202: First crack at XML
[Re: mlord]
|
enthusiast
Registered: 28/01/2002
Posts: 265
Loc: MI, USA
|
I think that sounds nice :-)
_________________________
guardian__J MKIIa 20g Smoke
|
Top
|
|
|
|
#73718 - 22/02/2002 10:52
Re: Hijack v202: First crack at XML
[Re: guardian__J]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Okay, something like that is in v205, due out shortly.
<playlist allow_files="0" allow_commands="1" stylesheet="/default.xsl" ...>
|
Top
|
|
|
|
#73719 - 22/02/2002 10:57
Re: Hijack v202: First crack at XML
[Re: mlord]
|
enthusiast
Registered: 28/01/2002
Posts: 265
Loc: MI, USA
|
can't wait to play with that...
hey crocklobster, can you incorporate the use of it into your "officially released" xsl's?
EDIT: hey...205 is out..
Edited by guardian__J (22/02/2002 10:58)
_________________________
guardian__J MKIIa 20g Smoke
|
Top
|
|
|
|
#73720 - 22/02/2002 11:01
Hijack v205 Released
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Yup, v205 is there. The only change was more tweaking of the .xml/.xsl formatting/handling, as per discussions in this thread.
Cheers
|
Top
|
|
|
|
#73721 - 22/02/2002 12:14
Re: Hijack v202: First crack at XML
[Re: mlord]
|
member
Registered: 19/12/2001
Posts: 108
|
Actually, it's cool if the attribute is always there, it's just that it would be best if the original request was ?.xml for the attribute to by an empty string. What I was going to do was take the value of that attribute and just stick it in the current <a> tags. What I needed was for that attribute to be equal to the string between the "?" and the ".xml" part of the request.
Anyway, lemme download the latest, update the stylesheets, and I'll comment again.
Chris
|
Top
|
|
|
|
#73722 - 22/02/2002 14:03
Re: Hijack v202: First crack at XML
[Re: crocklobster]
|
member
Registered: 19/12/2001
Posts: 108
|
Okay, here are the updated stylesheets to support the security features of the config.ini settings. If commands are disabled, the "Play" links won't show, and if files are disabled, the titles of tunes are not links to those files.
I have to update them one more time with the change for coding the playlist links correctly, based on the current stylesheet. Just waiting to see if Mark has any interest in making the value of the stylesheet attribute equal to the string between the "?" and the ".xml" of the http request.
It's not hard for me to deal with it the way that it is, it is another conditional I'll have to put in. I'll have to check for whether stylesheet="/default.xsl" or not and then make up my own link. Again, not a big deal, so if it's a pain to do it the other way, lemme know and I'll try to get this done tonight...but it is Friday night.
Chris
Attachments
71930-empegxml.zip (27 downloads)
|
Top
|
|
|
|
#73723 - 22/02/2002 14:21
Re: Hijack v202: First crack at XML
[Re: crocklobster]
|
enthusiast
Registered: 28/01/2002
Posts: 265
Loc: MI, USA
|
thanks man...
btw: I had to change it to also remove the tags column...that's unavailable with files=0
_________________________
guardian__J MKIIa 20g Smoke
|
Top
|
|
|
|
#73724 - 22/02/2002 14:30
Re: Hijack v202: First crack at XML
[Re: guardian__J]
|
member
Registered: 19/12/2001
Posts: 108
|
|
Top
|
|
|
|
#73725 - 22/02/2002 16:46
Re: Hijack v202: First crack at XML
[Re: guardian__J]
|
enthusiast
Registered: 24/08/2001
Posts: 344
Loc: France, Champagne
|
I ahve the same problem with the caracter é and probably è à ê .
Can this be also considered ?
_________________________
Empeg IIa - 10 Gb - Red Fascia -
Tuner, the day is coming
- I Will Strike From the Grey -
|
Top
|
|
|
|
#73726 - 22/02/2002 17:26
Re: Hijack v202: First crack at XML
[Re: Nosferatu]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Rather than get into a hundred or more special cases for escaping characters, is there not a more generic method that could be used here? Something like the HTML %20 (space) style of hex-encoding?
I think I tried %xx originally, only to see them displayed in the playlists from xml/xsl.
Remember, I don't know anything about xml/ssl here.
??
|
Top
|
|
|
|
#73727 - 22/02/2002 17:27
Re: Hijack v202: First crack at XML
[Re: crocklobster]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
I'm going to leave it as-is for now.
Okay?
|
Top
|
|
|
|
#73728 - 22/02/2002 17:34
Hijack v206: "Clock" popup.
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Hijack v206 is out.
The new feature-of-the-day is a virtual "Clock" button code, which can be bound to any button (or a popup menu) using the ir_translate features.
When "pressed", "Clock" causes a 4-second popup window to appear with the current time/date in it.
Note that since the Player software does not pass timezone information to the kernel, the time may appear wrong. To combat this, you can specify a time_offset=nnn in config.ini under [hijack. This offset is specified in minutes, and can be preceeded with a minus sign if need be. For example:
[hijack]
time_offset=-300 ; Eastern Standard Time (EST) Canada
Enjoy.
-ml
|
Top
|
|
|
|
#73729 - 22/02/2002 23:03
Re: Hijack v202: First crack at XML
[Re: crocklobster]
|
addict
Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
|
Alternating row colors can be done with a small bit of code btw:
<tr>
<xsl:attribute name="bgcolor">
<xsl:choose>
<xsl:when test = "(position() mod 2 =0)">lightblue</xsl:when>
<xsl:when test = "(position() mod 2 =1)">slate</xsl:when>
</xsl:choose>
</xsl:attribute>
...
|
Top
|
|
|
|
#73730 - 23/02/2002 06:23
Re: Hijack v202: First crack at XML
[Re: Yang]
|
addict
Registered: 19/08/2000
Posts: 588
Loc: England
|
Ah yes, that's a bit neater than the code I stuck in there. I thought there must be a more elegant solution. As I said before I'm no expert at XML/XSLT.
_________________________
Marcus
32 gig MKII (various colours) & 30gig MKIIa
|
Top
|
|
|
|
#73731 - 23/02/2002 06:39
Re: Hijack v206: "Clock" popup.
[Re: mlord]
|
addict
Registered: 24/08/2000
Posts: 658
Loc: India
|
For some reason when I have Popup0 selected in redefinition I get nothing to happen (no clock) when I give the knob a quick press. What might I be doing wrong?
|
Top
|
|
|
|
#73732 - 23/02/2002 06:53
Re: Hijack v206: "Clock" popup.
[Re: jwickis]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
PopUp0 does not have a "default" behaviour (anymore).
You have to define what you want it to do in config.ini, as in:
[ir_translate]
popup0=Clock,Info,Repeat,Shuffle,Visual
Cheers
|
Top
|
|
|
|
#73733 - 23/02/2002 07:01
Re: Hijack v206: "Clock" popup.
[Re: mlord]
|
addict
Registered: 24/08/2000
Posts: 658
Loc: India
|
Coolllllll works great now THANKS
|
Top
|
|
|
|
#73734 - 23/02/2002 07:55
Re: Hijack v206: "Clock" popup.
[Re: jwickis]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Good. But you got me thinking again, and so I've now released v207, which has a built-in default "PopUp0" -- you might now want to try commenting out the one you added (stick a ';' in front of it), to see what the default looks like.
Cheers
|
Top
|
|
|
|
#73735 - 23/02/2002 09:08
Re: Hijack v202: First crack at XML
[Re: crocklobster]
|
enthusiast
Registered: 16/02/2001
Posts: 373
Loc: Switzerland
|
I am using now two stylesheets. one is named with default.xsl and the other is default-alt.xsl. As a starter page I did a index.html. I am pointing on this index.html to bought styles. What I have to to that I can use bought styles without changing the config.ini and reboot the Empeg?
Changing the code in the xsl? but how?
Other possibility?
Any ideas?
Thanks a lot for all your great work on this new XML aera.
|
Top
|
|
|
|
#73736 - 23/02/2002 11:53
Re: Hijack v202: First crack at XML
[Re: beaker]
|
addict
Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
|
Heh, I just took what you had and played with it a bit. took me a couple tries to figure out that it doesn't like wrapping XLS statements around <td> blocks, but by looking at your code I figured it out.. Don't sell yourself short, all I know about XLS I learned from looking at your code..
|
Top
|
|
|
|
#73737 - 23/02/2002 16:41
Re: Hijack v206: "Clock" popup.
[Re: mlord]
|
member
Registered: 14/01/2002
Posts: 156
Loc: Saratoga, CA, USA
|
Nice capability, but it may be causing a slight problem.
I have:
"Analogue Clock" set as one of my "Favourite Visuals"
"KnobRight" translated to "Visulal+"
"Top.L" trasnslated to "Clock"
[ir_translate]
PopUp0=PopUp1,Shuffle,Repeat,KnobSeek
PopUp1=Artist,Album,Genre
KnobLeft=VolAdj.N,KnobLeft.U
KnobRight=Visual+.N,KnobRight.U
top.L=Clock
For Hijack 206 through 210 whenever KnobRight gets to the Analogue Clock display further right rotation causes a reboot!
Also, I am wondering how the Empeg keeps time. I notice there is now a time zone function in settings but it seems stuck on US-Alaska and I find I need an offset of -120 in [Hijack} to get to PST on the Hijack "Clock" display even though the Empeg time is already set to PST (which is -480 relative to GMT/UTC).
Further, when does the Empeg set the player software from the RTC? Last night it got off by about 20 minutes and only recovered after a reboot. Seems like it shouldn't get that far off unless the player doesn't recover time from the RTC after interruptions or it is creeping quite rapidly.
Lynn
|
Top
|
|
|
|
#73738 - 24/02/2002 09:49
Re: Hijack v206: "Clock" popup.
[Re: ellweber]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
>For Hijack 206 through 210 whenever KnobRight gets
>to the Analogue Clock display further right rotation
>causes a reboot!
Serial port logfile, please.
As for the timezone stuff, re-read the Hijack release notes, and direct non-Hijack issues to the Empeg folks, not me.
Thanks
-ml
|
Top
|
|
|
|
#73739 - 24/02/2002 11:02
Re: Hijack v206: "Clock" popup.
[Re: mlord]
|
member
Registered: 14/01/2002
Posts: 156
Loc: Saratoga, CA, USA
|
Mark, here is the serial port log data post reboot:
Abnormal player termination
Player received signal 11
Starting player
player.cpp : 385:empeg-car 2.00-beta11 2002/02/08.
Loading dancefile: "/empeg/lib/visuals/princedance.raw "
! visual_Loading dancefile: "/empeg/lib/visuals/ymca.raw"
callback.cpp: 339:Failed to open file required by visuals library "/empeg/lib/vi
suals/breakdance.raw": No such file or directory
Loading dancefile: "/empeg/lib/visuals/topPoleSpin.raw"
Prolux 4 empeg car - 2.1434 Feb 7 2002
Vcb: 0x4086d000
! mp3_decoder.cpp :1049:Failed to find valid sync after seeking to offset 7792
114, error=0xc0044000
The player runs fine until another KnobRight. Then you get this, looks like the serial port isn't fully restored right away and the first few lines are stuck in the buffer?
Restored terminal settings
Remounting first music partition read-only
Remounting second music partition read-only
No secondary hard disk
Abnormal player termination
Player received signal 11
Starting player
player.cpp : 385:empeg-car 2.00-beta11 2002/02/08.
Loading dancefile: "/empeg/lib/visuals/More Dancing.raw"
Loading dancefile: "/empeg/lib/visuals/breakdance.raw "
! visual_Loading dancefile: "/empeg/lib/visuals/newPoleDancer.raw"
callback.cpp: 339:Failed to open file required by visuals library "/empeg/lib/vi
suals/stonkdance.raw": No such file or directory
Prolux 4 empeg car - 2.1434 Feb 7 2002
Vcb: 0x4086d000
! mp3_decoder.cpp :1049:Failed to find valid sync after seeking to offset 6383
62, error=0xc0044000
Incidentally, stonkdance.raw is present in the /empeg/lib/visuals directory but I am still at v210.
Sorry about the time zone questions, just makes the [Hijack] offset problematic!
Lynn
|
Top
|
|
|
|
#73740 - 24/02/2002 11:12
Re: Hijack v206: "Clock" popup.
[Re: ellweber]
|
pooh-bah
Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
|
Could it be the breakdance.raw line in config.ini that mucks it up? Looks like there's an extra blankspace before the closing quote...
/Michael
_________________________
/Michael
|
Top
|
|
|
|
#73741 - 24/02/2002 11:29
Re: Hijack v206: "Clock" popup.
[Re: mtempsch]
|
member
Registered: 14/01/2002
Posts: 156
Loc: Saratoga, CA, USA
|
Coulkd be, I suppose. However, I do not see that space in the config.ini file, itself!
dance=breakdance.raw ; one of the "original" dances
dance=princedance.raw ; one of the "original" dances
dance=stonkdance.raw ; one of the "original" dances
dance=Air Tar.raw
dance=Dafonz.raw
dance=More Dancing.raw
dance=PoleDancer.raw
dance=newPoleDancer.raw
dance=topPoleSpin.raw
dance=ymca.raw
Stay tuned.
Lynn
|
Top
|
|
|
|
#73742 - 24/02/2002 12:36
Re: Hijack v206: "Clock" popup.
[Re: ellweber]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Yes, the space is buggering things.
I fixed that bug in v211 of Hijack.
-ml
|
Top
|
|
|
|
#73743 - 24/02/2002 13:08
Re: Hijack v206: "Clock" popup.
[Re: mlord]
|
member
Registered: 14/01/2002
Posts: 156
Loc: Saratoga, CA, USA
|
Mark, I loaded v211 and the reboot problem seems to remain. I still don't know why the breakdance file isn't found. It seems perfecly normal in the directory. I deleted it and recopied it to the Empeg from an archived copy with the same result as shown below:
Restored terminal settings
Remounting first music partition read-only
Remounting second music partition read-only
No secondary hard disk
Abnormal player termination
Player received signal 11
Starting player
player.cpp : 385:empeg-car 2.00-beta11 2002/02/08.
Loading dancefile: "/empeg/lib/visuals/Air"
! visual_Loading dancefile: "/empeg/lib/visuals/princedance.raw"
callback.cpp: 339:Failed to open file required by visuals libraryLoading dancefi
le: "/empeg/lib/visuals/newPoleDancer.raw"
"/empeg/lib/visuals/breakdance.raw": No such file or directory
Prolux 4 empeg car - 2.1434 Feb 7 2002
Vcb: 0x4086d000
! mp3_decoder.cpp :1049:Failed to find valid sync after seeking to offset 7038
75, error=0xc0044000
I then commented out all of the dance= statements in config.ini and now the reboot problem is gone. So, then I noticed that breakdance is the next statement after time_offset= in config.ini so I put the dance= back and commented out the time_offset= statement and it is still ok. Is this related to the sequence of these statements in config.ini? Then I tried putting time_offset= after all of the dance= and the reboot after Analogue Clock in the visuals+ sequence (Flancedoor is right after Analogue Clock in my sequence) is back but now it is balking at stonkdance.raw.
Restored terminal settings
Remounting first music partition read-only
Remounting second music partition read-only
No secondary hard disk
Abnormal player termination
Player received signal 11
Starting player
player.cpp : 385:empeg-car 2.00-beta11 2002/02/08.
pp: 339:Failed to open file required by visuals library "/empeg/lib/visuals/ston
kdance.raw": No such file or directory
Prolux 4 empeg car - 2.1434 Feb 7 2002
Vcb: 0x4086d000
! mp3_decoder.cpp :1049:Failed to find valid sync after seeking to offset 6863
955, error=0xc0044000
Since Flancedoor is not a big deal for me I'll be ok now with dance= commented out. This seems like a real obscure quirk that isn't worth much time unless it is a clue to something else.
Thanks,
Lynn
|
Top
|
|
|
|
#73744 - 24/02/2002 13:29
Re: Hijack v206: "Clock" popup.
[Re: ellweber]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Look closely at those messages.. does your player actually have ALL of the dance files listed there.. ?
Remember, the player only ever tries to load the three standard ones.. Hijack intercepts those requests, and substitutes the other ones, like Princedance.raw.. if any of those are missing or misspelled, then the error message you later see will only reference one of the three standard files, not the actual missing one.
-ml
|
Top
|
|
|
|
#73745 - 24/02/2002 15:10
Re: Hijack v206: "Clock" popup.
[Re: mlord]
|
member
Registered: 14/01/2002
Posts: 156
Loc: Saratoga, CA, USA
|
Humbled by a stray space in a file name. Sorry for the false alarm. I am still curious about the apparent interaction with the time_offset= line in config.ini.
Lynn
|
Top
|
|
|
|
|
|