Help - Search - Members - Calendar
Full Version: Title formatting question
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
burnett_s
Hi everybody,

In the pic below, you can see that there are two albums in the playlist.
The first one, with the 2 digits tracknumber, is displayed correct with the artist, date, album and genre in the left panel.
But the second one, with the 3 digits tracknumber, is not displaying anything in the left panel.

IPB Image

I'm using this code, does anybody know which line or lines should I modify in order to fix this issue?


CODE
//if there is a number of songs
$if(%tracknumber%,

//The first line in the album
$ifequal($sub(%tracknumber%,1),0,
//The performer if va != 1
%_t2%$ifequal($get_global(va),1,
$if3($meta(album artist),'VA'),
$if3(%artist%,%_t2%'Unknown Artist')),

//Second line in the album
$ifequal($sub(%tracknumber%,1),1,
%_t1%[%date%$if(%album%,'. ')][%album%],

//Third line in the album
$ifequal($sub(%tracknumber%,1),2,
%_t2%$if3(%genre%,'Unknown'),
)))

$tab(2)
//The track with coloring if<10
%_t3%'['
$ifgreater(%tracknumber%,9,
%_t1%$num(%tracknumber%,2),
%_t3%'0'%_t1%$num(%tracknumber%,1))
%_t3%'] '

//artist if va == 1
$ifequal($get_global(va),1,%_t2%%artist%' ● ',)

//title
%_t1%$replace(%title%,'(',%_t2%'(',')',%_t2%')'%_t1%)
$tab(3),

//if not numbers songs
//artist
%_t2%[%artist%]$if(%artist%,' ● ')
//title
%_t1%$replace(%title%,'(',%_t2%'(',')',')'%_t1%)
$tab()
//date. album
%_t1%[%date%$if(%album%,'. ')][%album%])


Many thanks,
Gonzalo
Yotsuya
I'm going to take a wild guess at what you are trying to achieve, are those three digit track numbers for multidisc sets? If so you should really split them up into proper discnumber and tracknumber tags. However if you want a quick fix....

See the lines of code that look like this?
$ifequal($sub(%tracknumber%,1),0,

Try replacing the %tracknumber% with $right(%tracknumber%,2) like this:
$ifequal($sub($right(%tracknumber%,2),1),0,

Personally I think there are much better ways to code this, like using $select($mod(%tracknumber%),<code track 1>,<code track 2>,<etc>). See the titleformat_help.html file in your main foobar directory for more information about basic titleformat commands.
burnett_s
QUOTE(Yotsuya @ Jan 5 2007, 17:16) *

I'm going to take a wild guess at what you are trying to achieve, are those three digit track numbers for multidisc sets? If so you should really split them up into proper discnumber and tracknumber tags. However if you want a quick fix....

See the lines of code that look like this?
$ifequal($sub(%tracknumber%,1),0,

Try replacing the %tracknumber% with $right(%tracknumber%,2) like this:
$ifequal($sub($right(%tracknumber%,2),1),0,

Personally I think there are much better ways to code this, like using $select($mod(%tracknumber%),<code track 1>,<code track 2>,<etc>). See the titleformat_help.html file in your main foobar directory for more information about basic titleformat commands.


Yes, they are multidiscs.

Many thanks, all the info I wanted is displaying correctly in the left pannel now.

What do you mean by "you should really split them up into proper discnumber and tracknumber tags" ? Adding 'DISCNUMBER' and 'TRACKNUMBER' separately in foobar Masstagger?

I don't know if there are much better ways or not, it's very difficult for me all this title formats and I really don't understand anything, I tried it so many times in the past...
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.