Support and General Use > Theming and Appearance Customization

Help with changing WPS information (disc/track#)

(1/2) > >>

RobDarst:
I am an old-timer with extremely limited programming skills. I'd be extremely grateful if someone could save me a great deal of frustration by explaining how to accomplish the following modification to the WPS. I currently use Cabbie v3 as my theme, with a larger font than the default.

Before the song title, I would like to see the disc number and track number (as recorded in the tag), separated by a period (or dash) and then a space before the title, like so: 1.05 Song Title (where "Song Title" is track #5 on disc #1).

If there is no disc number in the tag, then this value could be either default to 1, or no number and period/dash would appear, whichever is easier.

Many thanks in advance for your help.  :)

audio-i:
All the information you might need is here http://www.rockbox.org/wiki/CustomWPS , and what you want to do only requires a little time of reading and editing, no special skills at all ;) plus, after reading that, you'd be prepared to do almost any change to themes in the future, or, why not, make your own.

But in short, first you would have to open the theme's .wps file with a text editor.


--- Quote from: RobDarst on October 16, 2010, 12:22:49 PM ---Before the song title

--- End quote ---
that means you'd have to find there where the %it tag is (it could appear in several lines)


--- Quote --- I would like to see the disc number and track number (as recorded in the tag), separated by a period (or dash) and then a space before the title, like so: 1.05 Song Title (where "Song Title" is track #5 on disc #1).

--- End quote ---

Replace %it with something like

--- Code: ---%ik.%in %it
--- End code ---
(means disc number tag, period, track number tag, space, track title tag)


--- Quote ---If there is no disc number in the tag, then this value could be either default to 1, or no number and period/dash would appear, whichever is easier.
--- End quote ---

To add this conditional, you'd have to replace the %ik tag for a conditional, so the instruction would be something like

--- Code: ---%?ik<%ik|1>.%in %it
--- End code ---
means disc number conditional (%?ik = is disc number tag present?) if yes, display disc number, if not, display 1
The rest is like in the first example.

That should work if your tracks have the necessary tags (if not, you'd have to set more conditionals for the desired tags). I hope it helps






RobDarst:
Many thanks for the suggestions. I wasn't able to make the quick-and-easy substitution work--the WPS loses its "theme" as a result--but I have a better sense of the programming involved now, and plan to start building my own WPS from the ground up once I have some "free time."  :)

audio-i:

--- Quote from: RobDarst on October 18, 2010, 08:18:59 AM ---Many thanks for the suggestions. I wasn't able to make the quick-and-easy substitution work--the WPS loses its "theme" as a result--but I have a better sense of the programming involved now, and plan to start building my own WPS from the ground up once I have some "free time."  :)

--- End quote ---
Great!

I took a look a the actual theme's code (ipod video), and this should work: Replace


--- Code: ---%s%al%?it<%it|%fn>
--- End code ---
with

--- Code: ---%s%al%?ik<%ik|1>.%in %?it<%it|%fn>
--- End code ---

and

--- Code: ---%s%ac%?it<%it|%fn>
--- End code ---
with

--- Code: ---%s%al%?ik<%ik|1>.%in %?it<%it|%fn>
--- End code ---

If you want  it also on the next track info, replace


--- Code: ---%s%al%?It<%It|%Fn>
--- End code ---
with

--- Quote ---%s%al%?Ik<%Ik|1>.%In %?It<%It|%Fn>
--- End quote ---

and


--- Code: ---%s%ac%?It<%It|%Fn>
--- End code ---
with

--- Code: ---%s%al%?Ik<%Ik|1>.%In %?It<%It|%Fn>
--- End code ---


RobDarst:
Aaargh! So close, and yet so far. Here's what happens: The WPS turns black, all theme elements vanish. The track name appears as "01. Title," with no disc number (not even the default "1"). The ordering of the rest of the WPS is also different, though I didn't change any of the other code--for example, the R/L volume bars appear, though they don't in the cabbie WPS. Is some other setting perhaps working at cross purposes?

Navigation

[0] Message Index

[#] Next page

Go to full version