PhJuke - Music Jukebox for Photon

Home Page

Downloads

Documentation
   User Interface
   Hotkeys
   Directory Browsing
   PHJ Files
   Remote Control
   The FAQ

Screenshots

Change Log

Audrey!

Customize the Browser with PHJ Files

You can certainly use PhJuke perfectly well with only the directory browsing interface. But if you're like me, you want to view your collection in several different ways, only one of which corresponds to the layout of the files on the hard disk. And you may want more descriptive labels on the browse buttons.

PhJuke supports a simple index file format. A file with a .phj extension is recognized as an index file. For the most part, the UI treats a PHJ file as a special kind of subdirectory; when you select one from a menu page, it opens up a new menu page.

If a file index.phj exists in a directory, it is used when you navigate to the directory (this overrides the normal directory browse behavior).

PHJ files look just like Windows INI files: a list of sections, each starting with a title in square brackets, with each section containing a list of name=value pairs.

Keyword Reference

First a word about section headers. The text inside the square brackets will be used as the label of the menu button or text item. You can suppress the display of the text by specifying a font name of none.

Lines starting with semicolons are ignored.

arm Background color to use while the button is pressed. By default the color stays the same and the label is shifted down and to the right slightly. Setting an arm color can make it clearer that the button is being pressed.
bg Background color to use. Default is dark grey. (Note that the default doesn't change by target type like it does in directory browse mode. This may change in a future release.)
fg Foreground (text label) color to use. Default is white.
font Font for button label, or none for no label (only makes sense when image is specified). QNX font names tend to look like TypeSizeStyle where Type is the basic font type (the Audrey supports textfont, fixedfont, web, and term by default). Size is the point size, usually specified as a two-digit number. Style is i for italic, b for bold, or bi for bold and italic. For example, textfont12b is the 12-point bold regular text font.
image Filename of a GIF or JPEG image to put in the button or label. This may be an absolute path (remember it's evaluated on the Audrey, not on the fileserver) or a relative path, which will be evaluated relative to the directory the PHJ file is in.
height Height of the button or label in pixels. The default is 50.
new-line Insert a line break before this button or label.
target Where to go when this button is pressed. May point to a directory, an MP3 or OGG file, an M3U file, or another PHJ file. If this keyword isn't specified, the button is rendered as a label instead of a button, useful for section headings and the like.
width Width of the button or label in pixels.

Colors

Colors may be specified as three comma-separated values from 0-255 representing red, green, and blue levels, for example 255,255,0 for yellow. Or you can use the English aliases for common colors. The following aliases are recognized:

black blue brown celidon cyan gray green grey magenta purple red white yellow

Example

This example isn't the prettiest menu around, but serves to demonstrate all the keywords.

; Here's a button that adds an MP3 to the playlist.  It uses
; the default font and colors.
[My Favorite Song]
target=mp3/Barney/Greatest Hits/I Love You, You Love Me.mp3

; This button navigates to a directory where I have one
; subdirectory per artist.  Its label uses a larger than
; normal font, a blue background, and a yellow text color.
[Browse By Artist]
target=mp3
bg=blue
fg=yellow
font=TextFont16

; A text label on a new line.  Note the lack of "target"
; keyword.
[Music Styles]
new-line=1
font=TextFont16b

; A button on a new line, which launches an M3U playlist.
[Jazz]
new-line=1
target=jazz.m3u

; A button, probably on the same line as the previous one,
; which launches another M3U playlist.  This one has a yellow
; background, a blue text label, and turns grey when pressed.
[Classical]
target=classical.m3u
font=TextFont16
bg=255,255,0
fg=0,0,255
arm=127,127,127

; This button uses an image rather than a text label.
[Latin]
image=images/latin.gif
font=none
target=latin.m3u

; This button also has an image, but with a text label
; underneath.  We set it to a fixed size.
[Rock / Pop]
image=images/rock-pop.jpg
width=300
height=60
target=rockpop.m3u

Future Directions

Most likely a future release will set the default button styles depending on the target, just like the directory browser does. So if you want to make sure your buttons look a certain way, be sure to specify their colors and fonts.

Steven Grimm