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: multivalue fields used in title formatting (Read 1441 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

multivalue fields used in title formatting

Hello,

I want to sort the songs in the albumlist by genre and sometimes a song is tagged with multiple genres. To do this I made sure foobar sees the genre tag as a multivalue field, by adding it to preferences -> advanced -> display -> properties dialog -> multivalie fields.
Then I created a list of genres in the albumlist view with the following title formatting:

Code: [Select]
[%<genre>%]|%<artist>%|%title% '['%length%']'

This example works fine, songs are sorted by genre and songs with two genres are listed twice. But the list of genres tends to get very long and I wanted to shorten it by grouping the genres by their first letter:

Code: [Select]
$left([%<genre>%],1)|[%<genre>%]|%<artist>%|%title% '['%length%']'

The problem is that songs with two or more genres are omitted from this list. Is there a way to fix this? Or is this a limitation of title formatting?

Re: multivalue fields used in title formatting

Reply #1
Try
Code: [Select]
[<$left(%genre%,1)>]
instead of
Code: [Select]
$left([%<genre>%],1)

 

Re: multivalue fields used in title formatting

Reply #2
Hi,

Thanks for the help. I am now able to see the tracks with 2 or more genres as well.
Although it did not exactly do what I had in mind.

Take e.g. these 4 songs with genre metadata.
song 1: AOR; Hard Rock
song 2; Hard Rock; AOR
song 3: AOR
song 4: Ambient

Your solution gives this result.
Code: [Select]
$left([%<genre>%],1)|[%<genre>%]|%<artist>%|%title%
Code: [Select]
A--Ambient	  (song4)
 |-AOR   (song1, song3)
 |-Hard Rock   (song1)
H--AOR       (song2)
 |-Hard Rock (song2)
Songs with more than one genre are listed multiple times.
But what I wanted was this.
Code: [Select]
A--Ambient   (song4)
 |-AOR (song1, song2, song3)
H--Hard Rock (song1, song2)
Is this example possible with title formatting?

all the best,
kjn