View Single Post
  #1 (permalink)  
Old September 22nd, 2004
nxf nxf is offline
Disciple
 
Join Date: September 19th, 2004
Location: Melbourne, Australia
Posts: 12
nxf is flying high
Question I'm integrating a file launcher in Phex

Hi everyone.

I've put some work into getting phex to invoke an external "player" (viewer/whatever) on demand. I decided this would be useful if people were going to really benefit from the new segment scheduling work I did. I need some feedback to go any further with though. But first to bring you up-to-date with the current version in CVS (which is later than the latest beta release):

Next to the "search" button on the download screen there's a "preview" command which I've tested on windows (2k/xp) and linux. It looks at the file's extension and starts up the applicable viewer. If desired, there can be a "fallback" viewer to use when the extension isn't recognised. (The suffix is actually matched as a regular expression, btw)

Part of my configuration file looks like this:
previewMethod_jpe?g=/usr/local/bin/firefox %u
previewMethod_mr\\d=/usr/bin/splay %s

which uses firefox for .jpg and .jpeg files and splay for .mp2 and .mp3 files. (%s is substituted for the filename, %u for its URL).

On windows, "cmd /c %s" seems to do pretty much the same as what double-clicking on the file would do.

Ok now the problems:
Defaults:
- does it make sense to have any default players, or is it best to leave everything blank?
- If I did put some defaults in, they'd be OS-specific. I can detect this when phex is run, but I don't know sensible values for other systems - in particular, OSX.
Security:
- how can I make sure people don't introduce viruses/trojans/etc onto their systems by inadvertently running those files?
GUI
- would you be happy enough editing the configuration file, or is it worth the effort fiddling with the dialog boxes (and not making other improvements to phex)?
- and most importantly, does anyone want to make a little (16x16) icon for this button? :-)

anyway, hope you like the changes when you see them. The more feedback I get, the more chance this feature works as you'd like it to.
Reply With Quote