Help - Search - Members - Calendar
Full Version: Elapsed time fields not updating in trackinfo.
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
jsedgwick
Has anyone else encountered this problem? I'm using the trackinfo code verbatim from the first post of the "new 0.9 look" thread by habla. Pretty much the elapsed and remaining time stay put as if the song's not playing throughout.
Yotsuya
This issue has been addressed many times already, please search the forum before posting.

If you are using PanelsUI or a newer TrackInfoMod then you need to place your code under a // PerSecond header like this:

// PerSecond
%playback_time%

If you are using an older TrackInfoMod or TrackInfo panel then you need to enable the checkbox for update every second. I suspect the code you are using was written before the update headers in TrackInfoMod were implemented.
jsedgwick
Soory, I did search, but I got lost in the 50~ page long threads. Apologies, and thanks.
jsedgwick
Hmm, in panelsUI trackinfo, I have this code:

CODE
$rgb(255,255,255)
$if(%_trackinfo_notrack%,
    No track
,

[%playback_time% / ]%length%$char(10)$char(10)

[ Song Info ]$char(10)
Artist: %artist%$char(10)
Title: %title%$char(10)
Album: %album%$char(10)
Track No.: %tracknumber%$char(10)
Length: %length%$char(10)
Year: %date%$char(10)
Genre: %genre%$char(10)$char(10)

[ Technical Info ]$char(10)
)


If I put in // PerSecond like this
CODE

$rgb(255,255,255)
$if(%_trackinfo_notrack%,
    No track
,

// PerSecond
[%playback_time% / ]%length%$char(10)$char(10)

[ Song Info ]$char(10)
Artist: %artist%$char(10)
Title: %title%$char(10)
Album: %album%$char(10)
Track No.: %tracknumber%$char(10)
Length: %length%$char(10)
Year: %date%$char(10)
Genre: %genre%$char(10)$char(10)

[ Technical Info ]$char(10)
)


... the whole frame goes blank...


Yotsuya
You cannot use the update headers inside of a function. In the code you posted you are placing it in the false portion of an if statement. Try this instead:
CODE
// PerSecond
$rgb(255,255,255)
$if(%_trackinfo_notrack%,
No track
,

[%playback_time% / ]%length%$char(10)$char(10)

[ Song Info ]$char(10)
Artist: %artist%$char(10)
Title: %title%$char(10)
Album: %album%$char(10)
Track No.: %tracknumber%$char(10)
Length: %length%$char(10)
Year: %date%$char(10)
Genre: %genre%$char(10)$char(10)

[ Technical Info ]$char(10)
)


I would also suggest learning how to use $alignabs() and moving away from $char(10) as alignabs gives you much more flexibility when aligning text.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.