Seeking documentation for the script format used in Audacious' playlist: Song display - custom format - title string
Added by Agarthan Nephilim about 3 years ago
Hi team. First post here.
I'm having trouble finding any documentation on the scripting used in Audacious' Playlist window when displaying custom song title formats - example:
${?artist:${artist} }${?album:[ ${album} ] }${?artist:- }${?track-number:${track-number}. }${title}
If I was asking the same question for Winamp's Playlist display, I could be pointed to the following resource, which still exists online for WinAmp users:
http://www.meggamusic.co.uk/winamp/docs/help/atf/atf.htm
Can anyone point me to a similar user guide to the scripting used in Audacious' Playlist window, for showing custom Song Title strings?
Note I did have had a few goes at rolling my own before coming here, but Audacious' version seems to lack conditional statements, which I need for what I'm trying to do.
Using WinAmp's scripting (called 'Advanced Title Formatting'), you could use something like:
[%artist% - ]$if2(title,$filepart(filename))
In this example, the script includes a conditional part ($if2): every song title with valid content in its title tag has that content shown; for any which do not, the file part of the filename tag is shown instead.
If anyone can share a link to the documentation, or even an example of how to do the same thing in Audacious, it would be super!
Many thanks, Agarthan
Replies (1)
RE: Seeking documentation for the script format used in Audacious' playlist: Song display - custom format - title string - Added by John Lindgren about 3 years ago
I'm not sure if we have any real documentation, but here are some examples of conditionals:
${?album:TEXT}
"if <album> is valid then 'TEXT' otherwise nothing" ${(empty)?album:TEXT}
"if <album> is blank then 'TEXT' otherwise nothing" ${==genre,"Classical":TEXT}
"if <genre> is 'Classical' then 'TEXT' otherwise nothing" (can also use !=
)${==year,1990:TEXT}
"if <year> is equal to 1990 then 'TEXT' otherwise nothing" (can also use !=
, <
, <=
, >
, >=
)
The most authoritative reference is probably the unit tests:
https://github.com/audacious-media-player/audacious/blob/master/src/libaudcore/tests/test.cc#L216