Help me with my formatting string. |
This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.
See also: Hydrogenaudio Terms of Service.
![]() ![]() |
Help me with my formatting string. |
Sep 28 2003, 02:45
Post
#1
|
|
|
Group: Members Posts: 648 Joined: 25-October 02 From: Colombia Member No.: 3620 |
Hi
I need some help with my formatting string, the problem is that some of my files don't have tags but are named 'Artist - Title', so I came up with this code to split them in two fields and store them in variables, this works ok, but the columns are not aligned with the other columns (of the files that have tags) this is my formatting string: CODE $puts(title_from_filename,$right(%_filename%,$sub($len(%_filename%),$add($strchr(%_filename%,'-'),1)))) $puts(artist_from_filename,$left(%_filename%,$sub($strchr(%_filename%,'-'),2))) $num(%_playlist_number%,$len(%_playlist_total%)). $if(%title%, $if2(%artist%,unknown artist) $tab(3) %title% $tab(3) $if(%album%,%album%[ #[%disc%/]$num(%tracknumber%,2)]) , $get(artist_from_filename) $tab(3) $get(title_from_filename) ) $tab(4) $if(%_isplaying%,'◊ ') [['['$if2(%__codec%,$upper($ext(%_path%)))']' ]$pad_right(%_length%,5,0)] Screenshot here First two files don't have tags on them Thanks. This post has been edited by /\/ephaestous: Sep 28 2003, 02:55 -------------------- "You have the right to remain silent. Anything you say will be misquoted, then used against you."
|
|
|
|
Sep 28 2003, 03:04
Post
#2
|
|
|
Group: Members Posts: 648 Joined: 25-October 02 From: Colombia Member No.: 3620 |
Oh, never mind, I found out, thanks anyway.
it was missing a $tab(3) CODE $puts(title_from_filename,$right(%_filename%,$sub($len(%_filename%),$add($strchr(%_filename%,'-'),1)))) $puts(artist_from_filename,$left(%_filename%,$sub($strchr(%_filename%,'-'),2))) $num(%_playlist_number%,$len(%_playlist_total%)). $if(%title%, $if2(%artist%,unknown artist) $tab(3) %title% $tab(3) $if(%album%,%album%[ #[%disc%/]$num(%tracknumber%,2)]) , $get(artist_from_filename) $tab(3) $get(title_from_filename) $tab(3) ) $tab(4) $if(%_isplaying%,'◊ ') [['['$if2(%__codec%,$upper($ext(%_path%)))']' ]$pad_right(%_length%,5,0)] If an admin sees this feel free to delete this thread and this one where I uploaded the screenshot This post has been edited by /\/ephaestous: Sep 28 2003, 03:06 -------------------- "You have the right to remain silent. Anything you say will be misquoted, then used against you."
|
|
|
|
Sep 30 2003, 12:56
Post
#3
|
|
![]() Group: Members Posts: 680 Joined: 11-July 03 From: Brno, Czech Rep. Member No.: 7705 |
/\/ephaestous,
could you explain $tab(x) to me? i can't see it in official tagz help, but it seems to do variable columns which would be cool for non-fixed width fonts thank you in advance -------------------- info about my tag guesser script for foo_lua (preview version available):
http://www.hydrogenaudio.org/index.php?showtopic=16987 |
|
|
|
Sep 30 2003, 13:13
Post
#4
|
|
|
Columns UI developer Group: Developer Posts: 3034 Joined: 20-December 02 From: United Kingdom Member No.: 4177 |
QUOTE (mazy @ Sep 30 2003, 12:56 PM) /\/ephaestous, could you explain $tab(x) to me? i can't see it in official tagz help, but it seems to do variable columns which would be cool for non-fixed width fonts thank you in advance not /\/ephaestous, but $tab(x) seems to be same as $repeat($char(9),x) except limited upto 16. These columns have been around for a while, but not documented.. A higher value creates a wider column, sort of. You put the $tab(x) after the column contents, but the very last $char(9) will indicate right aligned text, so dont put one after %_length% or whatever is there if you want it right aligned. This post has been edited by musicmusic: Sep 30 2003, 13:19 -------------------- .
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 24th May 2013 - 09:51 |