HydrogenAudio

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: AzaIndustries on 2012-11-06 10:23:25

Title: Custom Library View Syntax
Post by: AzaIndustries on 2012-11-06 10:23:25
Hey everyone, Just discovered this awesome program a few days ago and have been blasting music out through WASAPI all day long.

But I've been having a problems trying to get the library view to work the way I want it. I've been reading the Title Formatting wiki page again and again and tried numerous things but I can't get my idea to work.

at the moment I am using this:
[%album artist%|]%album% [Disc %discnumber%] %codec%|[%track%] - %filename%

But I've been trying to create a way so that it only uses the album artist part if that artist has more then 1 album otherwise it will just list the albums in the library without the artist.

I've tried numerous stuff like:

%album artist%|$ifgreater(%album%,1,
%album artist%|%album% [Disc %discnumber%] %codec%|[%track%] - %filename%,
%album% [Disc %discnumber%] %codec%|[%track%] - %filename%)

But I fear I just don't understand this stuff well enough to get it to work.
Any help would be greatly appreciated!

P.S. Please don't laugh at my attempt above

Title: Custom Library View Syntax
Post by: marc2003 on 2012-11-06 10:36:19
what you're asking isn't possible. it's not possible to "count" albums like that. the only way you could do it would be to tag each track with custom tags which would be ugly and would require manual updating every time an album is added/removed from your collection.

you *might* have some luck with foo_uie_sql_tree. i don't use it myself so have no idea what it's really capable of.

http://www.foobar2000.org/components/view/foo_uie_sql_tree (http://www.foobar2000.org/components/view/foo_uie_sql_tree)
Title: Custom Library View Syntax
Post by: ruebe on 2012-11-06 11:03:55
i am not sure what library viewer you're using, and wheter you're willing to switch it
furthermore i also don't know if my suggestion works...
anyway, have a look at esplaylist (http://foo2k.chottu.net/) - this component has a special tag,  %es_subgroup_count%, that, well, counts subgroups...it works great for tracks in albums, and i guess it as well can be used to count albums
Title: Custom Library View Syntax
Post by: AzaIndustries on 2012-11-06 12:50:23
Hey thanks a lot for that!
It seems like it should work, now I just need to figure all this programming stuff out.
Title: Custom Library View Syntax
Post by: mjm716 on 2012-11-06 17:20:19
Hey thanks a lot for that!
It seems like it should work, now I just need to figure all this programming stuff out.


At one point I was working through a similar wish (I think).

It made sense to me at the time to update my physical folder naming structure, so if a band only had one album the folder name was %artist% - %album% (%date%); otherwise structure is nested %artist% | %date% %album%.

That gives an easy way to title reference 'single servings'.

I used this as a filter to handle names containing ' - ' as well as Various Artists...

$caps($left($stripprefix(%album artist%),1))|$stripprefix(%album artist%) $if($strstr(%directoryname%,' - '),':'  $if2(%releaseyear%,%date%) %album% '['%genre%']'| %tracknumber% %title% $if(%releaseyear%,%date%) '['%length%']' $repeat(?,$meta(rating))$if($strchr($meta(rating),.),?),| $if($stricmp(%album artist%,Various Artists),$stripprefix(%album%) ['CD'%DISCNUMBER%] $if2(%releaseyear%,%date%) '['%genre%']',$if2(%releaseyear%,%date%) $stripprefix(%album%) ['CD'%DISCNUMBER%] '['%genre%']')| %tracknumber% %title% $if(%releaseyear%,%date%) '['%length%']'$repeat(?,$meta(rating))$if($strchr($meta(rating),.),?))

regards