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:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Next track info when song is about to finish?
« previous next »
  • Print
Pages: [1]

Author Topic: Next track info when song is about to finish?  (Read 1207 times)

Offline Elaphe

  • Member
  • *
  • Posts: 23
Next track info when song is about to finish?
« on: July 30, 2014, 07:30:19 PM »

I have seen this feature in a script but I have not been able to figure out how it works. I know how to display the next song title, but not how to make this work when there are only 15 seconds left for the song to finish. Also, I'd like to make the song title temporarily replacing the text of the track number, which is as follows in my theme:

Code: [Select]
# Track number
%Vl(b,0,75,-,-,2) %Vf(ffffff) %Vb(000000)
%acTrack: %?in<%in|N/A>

Can you help me modify this code for the function I want? Thanx.
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: Next track info when song is about to finish?
« Reply #1 on: July 30, 2014, 07:52:30 PM »
Code: [Select]
%ac%s%?if(%pr,>,15)<Track: %?in<%in|N/A>|Next Track: %?It<%It|%Fn>>

Pretty simple really. Lets break it down for you:

Center align all following text;
Scroll if we need to;
If current track time remaining is greater than 15s - show the current track number - else display the next track title;
If no next track title metadata is present, fall back to the next track file name.
End.


[Saint]
Logged
Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline Elaphe

  • Member
  • *
  • Posts: 23
Re: Next track info when song is about to finish?
« Reply #2 on: July 31, 2014, 03:57:52 AM »
Thank you very much.

I'm also trying with another idea: using timeouts to automatically switch between track number and next track title. However, I have the same problem as with other timeout I've tried for a graphic element: only one of the timeouts works with the specified time (9 seconds). The other one keeps on using 1 second.

Can you please take a look at the code. There must be something wrong. I don't really understand how to use < > | ; etc. so it's all trial and error for me until things start working. XD

Code: [Select]
%acTrack: %?in<%in|N/A>;%t(9.0)%ac%sNext Track: %?It<%It|%Fn;%t(9.0)>
Logged

Offline Elaphe

  • Member
  • *
  • Posts: 23
Re: Next track info when song is about to finish?
« Reply #3 on: July 31, 2014, 04:38:35 AM »
OK, I think I got it. It seems the timeouts must be placed before the item:

Code: [Select]
# Track number
%Vl(b,0,75,-,-,2) %Vf(ffffff) %Vb(000000)
%ac%t(5.0)Track: %?in<%in|N/A>;%t(10.0)%ac%sNext: %?It<%It|%Fn>
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Next track info when song is about to finish?
 

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

Page created in 0.063 seconds with 15 queries.