Help - Search - Members - Calendar
Full Version: formatting help
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
jkwarras
Hi,

I would like to separate values in a same tag that are separated by ',' for ex.

%styles%=Adult Alternative Pop/ Rock,Alternative Pop/ Rock,Singer/ Songwriter
...

With the normal formatting
CODE
$if2(%styles%,'()')|whateveryouwant

I get this:

All music
+()
+Adult Alternative Pop/ Rock,Alternative Pop/ Rock,Singer/ Songwriter
+Alternative Pop/ Rock
+Hard Rock,Alternative Pop/ Rock,Heavy Metal,Grunge,Alternative Metal
...


And what I woudl like is this:

+()
+Adullt Alternative Pop/ Rock
+Alternative Pop/ Rock
+Alternative Metal
+Grunge
+Hard Rock
+Heavy Metal
+Singer/ Songwriter
...

But I don't know how to get this (or if it's possible) via formatting strings, can someone help me out?

Thanks a lot! smile.gif

Edit: Oh! I just thought about this, can a song be displayed in multiple %styles%? Because I guess that if this sorting can be done it has to pick a value (I guess by default it will pick the first one), but I owuld like to have it under all the values on the tag... blink.gif headbang.gif
rocketsauce
Don't enclose the tag name in %.

Instead of:

CODE
$if2(%styles%,'()')|whateveryouwant


just make it:

CODE
styles|whateveryouwant


As far as I can tell, this works for any tag. For example, my Album List for Genre looks like this:

CODE
genre|artist|%album%|[[%disc%.][$num(%tracknumber%,2).] ]$if2(%title%,%_filename_ext%)


By not enclosing genre and artist in %, multiple values for those tags will each appear as their own node in the tree.

Rob
desigrid
QUOTE(jkwarras @ Nov 26 2004, 08:25 AM)
I would like to separate values in a same tag that are separated by ',' for ex.
*
The method described by rocketsauce will only work if you have multiple styles tags i.e.:

styles=Adult Alternative Pop/ Rock
styles=Alternative Pop/ Rock
styles=Singer/ Songwriter

You can use Masstagger's "Split field by separator" to help automate this process.

Edit: typo.
rocketsauce
Right. I forgot that part.

Also, if you use the special file info box for tagging, you can use \ as a value separator.

Rob
jkwarras
People, thanks to all! I'll try that smile.gif
jkwarras
I've tried what you suggested (spli field by separator) and it works, thanks again smile.gif

But I have a problem with this:

QUOTE(rocketsauce @ Nov 26 2004, 11:07 AM)
Don't enclose the tag name in %.

Instead of:

CODE
$if2(%styles%,'()')|whateveryouwant


just make it:

CODE
styles|whateveryouwant


As far as I can tell, this works for any tag. For example, my Album List for Genre looks like this:

CODE
genre|artist|%album%|[[%disc%.][$num(%tracknumber%,2).] ]$if2(%title%,%_filename_ext%)


By not enclosing genre and artist in %, multiple values for those tags will each appear as their own node in the tree.

Rob
*


If I use
CODE
styles|whateveryouwant

I get every value for styles tag in their own node (so I have multiple values for same artist) but I don't get in the album list files without this tag. There's no '()' in the album list for those files sad.gif
rocketsauce
QUOTE(jkwarras @ Nov 27 2004, 04:13 AM)
If I use
CODE
styles|whateveryouwant

I get every value for styles tag in their own node (so I have multiple values for same artist) but I don't get in the album list files without this tag. There's no '()' in the album list for those files sad.gif
*


Yeah, that is one of the problems. My "workaround" is to put dbexplorer panel in a tab and set up different views that specifically show missing tag values.

Rob
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.