Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category User Interface → Themes
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.8.1
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by sockbox - 2011-05-05
Last edited by bluebrother - 2011-06-05

FS#12100 - Track length in seconds

This patch displays the track length in seconds using a custom WPS tag, %pz.

The idea behind this tag is to use the track length in a conditional statement.

What I want to do is to determine the length of a song and change the font size to accommodate for the additional text. This will be useful when handling smaller resolution players such as the Sansa Clip.

ie. I want to find out if a track is longer than 10 minutes.
%?if(%pz, <, 600)<%Vd(a)|%Vd(b)>

Viewports a & b will define the font output.

The patch works if you just want to display the track length in seconds (%pz). But I cannot get it to work correctly with any values in the conditional statement above. The value does not seem to be interpreted as an integer.

Closed by  bluebrother
2011-06-05 11:06
Reason for closing:  Rejected
Additional comments about closing:  

no real name

why are you do time/1000 for the display but not for the *intval?

To tell you the truth, I'm not a C programmer. I just copied & pasted the code from another part of the file.

I'm hoping for some input into how to make it work correctly.

Thanks for the tip. Looks to be working now.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing