I would like to implement the following function into my skin:
comparing current and next track title and displaying nothing if TRUE (i.e., in one track playback mode); otherwise displaying next track title.
Currently, *if onetrack is not available.
On newer beta version (v1.5), however, we can use foobar2000 titleformatting tag and function in the [label] element.
So I thought I could implement this function by using $strcmp(A,B) function to compare the current and next track titles like below.
[label]
62.5,1375,827.5,100
left
[infosource-nowplaying]$puts(now,%title%)[infosource-nextplaying]$puts(next,%title%)$if($strcmp(now,next),,next)
Unfortunately, this script did not work.
After much trial and error, I found that using $puts(key, value) more than once and $if(cond,then,else) seem to work fine on the [label] element.
In addition, it appears that [title] and [nexttitle] cannot be used with titleformatting; titleformatting is ignored.
I found that using [infosource-nowplaying] or [infosource-nextplaying] appears to clear the variables defined prior to that.
That is, in the above script, the now variable becomes undefined at the time of string comparison, and the comparison result is always FALSE.
(@Peter Is this behavior of [infosource-] as designed?)
If there is a better way to implement this feature, please let me know.