Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Need help with title formatting (adding playback statistics to WSH Pan (Read 2727 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Need help with title formatting (adding playback statistics to WSH Pan

I am at a loss as I'm not really that great with title formatting yet (been using foobar2000 for a few months at most).

I have a WSH Panel that is a seekbar, and it has some info about the currently playing song.
Now, I wanted to add playback statistics to the seekbar...
Code: [Select]
%playback_time%/%length% $info(codec)$if($strcmp($info(encoding),lossy), $info(codec_profile) '('$info(bitrate)kbps')', '('Lossless')') | Last Played: %last_played% '('Played %play_count% $ifequal(%play_count%,1,time,times) in total')'


How would I have it so that it displays like it currently does for songs I have played at least once, but displays "Playing song for the first time" rather than "Last Played ** (Played * times in total)" for new songs?

Need help with title formatting (adding playback statistics to WSH Pan

Reply #1
Wait, are you talking about a wsh panel or a track info panel??

I think that you are using a track info panel... if I'm right you should use something like:

Code: [Select]
$ifequal(%play_count%,1,
Playing song for the first time
,
...the code you used...
)
<insert signature here>

Need help with title formatting (adding playback statistics to WSH Pan

Reply #2
No, I'm not talking about a track info panel, else I would have mentioned it...
I'm talking about a WSH Panel. It uses JScript.
Code: [Select]
var g_titlefmt = fb.TitleFormat("TITLE_FORMATTING_HERE")

- Bottom of the screenshot, under the playlist tabs dropdown.

I'm pretty sure I have to use the square brackets or something to get what I am aiming for, of which I have no idea how to use.

EDIT: Playlist dropdown, not tabs...

 

Need help with title formatting (adding playback statistics to WSH Pan

Reply #3
I did it.

Code: [Select]
var g_titlefmt = fb.TitleFormat("%playback_time%/%length% $info(codec)$if($strcmp($info(encoding),lossy), $info(codec_profile) '('$info(bitrate)kbps')', '('Lossless')') | $ifgreater(%play_count%,0,Last Played: %last_played% '('Played %play_count% $ifequal(%play_count%,1,time,times) in total')',Playing track for the first time)")




Sorry for such a pointless thread...