Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Help with changing WPS information (disc/track#)
« previous next »
  • Print
Pages: [1]

Author Topic: Help with changing WPS information (disc/track#)  (Read 1297 times)

Offline RobDarst

  • Member
  • *
  • Posts: 7
Help with changing WPS information (disc/track#)
« on: October 16, 2010, 12:22:49 PM »
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.  :)

Logged

Offline audio-i

  • Artist
  • Member
  • *
  • Posts: 266
Re: Help with changing WPS information (disc/track#)
« Reply #1 on: October 16, 2010, 05:58:42 PM »
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
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).

Replace %it with something like
Code: [Select]
%ik.%in %it
(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.

To add this conditional, you'd have to replace the %ik tag for a conditional, so the instruction would be something like
Code: [Select]
%?ik<%ik|1>.%in %it
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






« Last Edit: October 16, 2010, 06:37:11 PM by audio-i »
Logged

Offline RobDarst

  • Member
  • *
  • Posts: 7
Re: Help with changing WPS information (disc/track#)
« Reply #2 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."  :)
Logged

Offline audio-i

  • Artist
  • Member
  • *
  • Posts: 266
Re: Help with changing WPS information (disc/track#)
« Reply #3 on: October 18, 2010, 08:43:44 AM »
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."  :)
Great!

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

Code: [Select]
%s%al%?it<%it|%fn>
with
Code: [Select]
%s%al%?ik<%ik|1>.%in %?it<%it|%fn>

and
Code: [Select]
%s%ac%?it<%it|%fn>
with
Code: [Select]
%s%al%?ik<%ik|1>.%in %?it<%it|%fn>

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

Code: [Select]
%s%al%?It<%It|%Fn>
with
Quote
%s%al%?Ik<%Ik|1>.%In %?It<%It|%Fn>

and

Code: [Select]
%s%ac%?It<%It|%Fn>
with
Code: [Select]
%s%al%?Ik<%Ik|1>.%In %?It<%It|%Fn>


« Last Edit: October 18, 2010, 09:16:08 AM by audio-i »
Logged

Offline RobDarst

  • Member
  • *
  • Posts: 7
Re: Help with changing WPS information (disc/track#)
« Reply #4 on: October 18, 2010, 12:48:05 PM »
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?
Logged

Offline audio-i

  • Artist
  • Member
  • *
  • Posts: 266
Re: Help with changing WPS information (disc/track#)
« Reply #5 on: October 18, 2010, 01:18:12 PM »
Can you post your current .wps file? I tested the changes I posted and they work...
Logged

Offline RobDarst

  • Member
  • *
  • Posts: 7
Re: Help with changing WPS information (disc/track#)
« Reply #6 on: October 18, 2010, 01:33:12 PM »
I gave it one last try before replying, and presto! it works. I have no idea what I did wrong before (I deleted the ones that didn't work). All's well that ends well--Many thanks for your help!  ;D
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Help with changing WPS information (disc/track#)
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.066 seconds with 15 queries.