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: Pattern code for classic 0.9.x all-in-one playlist column (Read 1261 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Pattern code for classic 0.9.x all-in-one playlist column

I'm looking to get the classic 0.9.x playlist column entries back, like it's shown here:

Does anyone have such a pattern code that emulates the 0.9 playlist style?
Something like...
Code: [Select]
[%artist%] - [[%album%]] [%title%]

...just with fallback to the filename when no tags are there and so on.

I've googled around and searched the forum with various search terms, but couldn't find what I'm looking for.

Pattern code for classic 0.9.x all-in-one playlist column

Reply #1
Something like this?:
$if($and(%artist%,%title%),[%tracknumber%.] - [%artist%] - [%title%],%filename%)
<3 f00

 

Pattern code for classic 0.9.x all-in-one playlist column

Reply #2
About the conditional display of Track Title vs File Name in the 'playlist viewer'; a few personal notes and observations from me. . .

                              * * * * *

Looking at foobar2000 toolbar "File -> Help -> Title formatting help":

          Syntax          : %title%
          Description    : Title of the track. If “title” metadata field is missing, file name is used instead.

   
It seems %title% always resolves to %filename% as a fallback ...regardless of further syntax input.
Also note, the 'playlist viewer' for 'fb2k with default user interface' does not offer conditional color display options.

                              * * * * *

In general, I don't like using square brackets for 'playlist viewer' display,
I get visually confused when things go blank and I like continuous text feedback about the media library properties.
I prefer to use $if2... boolean-type statements to always display something visually useful.

However there are some exceptions, and this syntax block is one of them:
Quote
//====== If path is CD Disc or Network Location...
//====== I prefer to not use square brackets, but these two cases give me NO CONTROL of the file system.

$if($or($strstr(%path%,'cdda:'),$strstr(%path%,'http:')),
[%artist%'  —  '][%title%],
other_syntax_operations
)


                              * * * * *

I use foobar2000 with 'Columns UI' alternative user interface and its built-in playlist viewer 'NG Playlist',
and one of the outstanding features of CUI is usage of colors and their conditional formatting.

In my fb2k, I have a playlist viewer column named 'Tr Title' which has a pretty complicated titleformatting script for the display:

The default displayed string color is White.
The previous syntax block (cdda: ... http:) is used, and I put it at the beginning of my script.
The syntax block section "other_syntax_operations" contains syntax forcing the displayed string color to change to Pink if a value is not present in the 'Track Title' tag.

                              * * * * *

So with all that in mind,

To operate on this expression: "Display the string of the 'Track Title' tag, but if not possible, display the string of the File Name"
I prefer to use this foobar2000 syntax:
Quote
$ifequal($len($meta(title)),0,$rgb(255,220,220)%filename%,$if2($meta(title),$rgb(255,220,220)%filename%))


And, to operate on this expression: "Display the string of the %artist% tag array" (Checks following metadata fields, in this order: “album artist”, “artist”, “composer”, “performer”.)
instead of using this:
Quote
[%artist%]
I prefer to use this:
Quote
$ifequal($len(%artist%),0,'%artist%',$if2(%artist%,'%artist%'))
which, rather than display nothing, will display %artist% as a literal string, giving me feedback on the 'playlist viewer' display string structure, and the properties of my media library.