Help - Search - Members - Calendar
Full Version: Panels UI: Don't update variable *display*
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
leokennis
Sorry for the vague title...


In my trackinfo mod display (or panels_ui or whatever it is named this day smile.gif ) I have a certain variable that displays when the currently playing track was last played. Basically it just displays %last_played% but formatted in the form of "Last week" or "Thursday evening" etc. with the help of some code I found on this forum.

This is nice and all, but after playing for 1 minute, Foobar updates the playcount and last played date of a track, so after 1 minute of playing it always says I played this track "This night" (or morning / evening / afternoon), which is kind of lame, since duh, I'm lsitening it right now.

What I would like to establish is that the value for the %last_played% does not change during playback. The actual value (that is written into the Foobar databse or the file tag) should of course change, but the displayed value should be the one that was fetched by the trackinfo_mod when playback started and it shouldn't change after 1 minute.

I tried to get this to work by putting the code under "// PerTrack" but even then the display is updates after exactly one minute. If I put the code under "// Background" it doesn't display anythinfg at all...


So the real question: is there a way to make a variable unchangeable during playback, but only in display?

Jesus Christ this problem is hard to explain...


Thanks in advance for the help!
odyssey
Put it in your own variable on playback change wink.gif
$puts(lastplayed,%last_played%)

You get it with $get(lastplayed)
radio_cascara
well i think i understood you. smile.gif

but unfortunately my first bet would be //per track too.
if that doesn't work i'm out of elegant ideas. if nobody gives you any smarter advice here's what would i do in your place: i would check for %_time_elapsed_seconds% and update display when it's for instance 1 second.
so it would be updated exactly at 1 second of playing and never again.

i never tried it tho, so i'm not completely sure if it would work smile.gif
odyssey
QUOTE(radio_cascara @ Jul 25 2007, 23:25) *

but unfortunately my first bet would be //per track too.

Duh! Of course that would be enough, even without my trick above dry.gif
leokennis
// PerTrack does not work as I stated in the topic start: the variable display changes as soon as the variable changes (that is: after 1 minute). Don't know why, but anyway even under // PerTrack it updates.

If I use this: $puts(lastplayed,%last_played%) and then $get(lastplayed), it still changes immediatly after the variable changed (1 minute)...
radio_cascara
have you tried %_time_elapsed_seconds% trick?

besides, i'm not using %last_played%, but the plugin that puts that tag in should have a setting where you enter how long into a song it will update tag.
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.