Help - Search - Members - Calendar
Full Version: Can an item appear twice in the same tree?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
marcomk
Hi,

I was trying to customize my genre view in the Albumlist so that it could support files with multiple genres.

I.e. The album "Magnolia" may go under the genre "soundtrack" and under the genre (let's say) "pop". In my genre view, I would like the the album to appear at the same time under the node Soundtrack and under the node Pop. Is it possible? Do you have any idea how to do it?

Thanks
foosion
One level in the hierarchy format should be plain "genre" (without the quotes, ex. "genre|%_filename%"). Additionally, you have to add two genre tags to the files in question, one with value "Soundtrack" and another with value "Pop".
marcomk
Thank you, I managed to do what I wanted. If I use plain "genre", I can now find Magnolia in the genre view under "Soundtrack" and under "Pop".

However, I have another problem now. If I use plain "genre" to create the genre view, I can't modify it at all. For example, I can't create a ---No genre --- node for all the untagged files, as a function like "$if(%genre%,genre,---no genre---)" doesn't work. On the other hand, if I use "%genre%" instead of "genre", Albumlist doesn't recognize multiple genres (it adds a new genre in the genre view named "Soundtrack, Pop")

The thing is... I can't really understand what plain "genre" is: a function? a variable? How can I use it in a $if function?

Thanks again
foosion
QUOTE(marcomk @ Sep 2 2004, 05:00 PM)
The thing is... I can't really understand what plain "genre" is: a function? a variable? How can I use it in a $if function?
*

The album list plugin splits your hierarchy format into parts at pipe | characters. Those parts correspond to different levels in the hierarchy. If a part is not a formatting script, i.e. there are no percent or dollar signs, which means the value is a constant, the plugin assumes that part is the name of a tag. In that case, it adds an entry for each instance of that tag for a given track.
marcomk
QUOTE(foosion @ Sep 2 2004, 04:53 PM)
The album list plugin splits your hierarchy format into parts at pipe | characters. Those parts  correspond to different levels in the hierarchy. If a part is not a formatting script, i.e. there are no percent or dollar signs, which means the value is a constant, the plugin assumes that part is the name of a tag. In that case, it adds an entry for each instance of that tag for a given track.
*



Ok, fine, I think I understand that. The problem is that I can't reproduce the same behaviour of plain "genre" within a formula.

Let's say I use the formatting string "genre|artist|album|title" in Albumlist.

I obtain a tree like this:

...[+]--Alternative
...[+]--Electronic
...[-]---Pop
.............[+]---Madonna
.............[-]----Aimee Mann
...............................[+]--Magnolia
...[-]---Soundtrack
..............[-]---Aimee Mann
...............................[+]--Magnolia
..............[+]---Ennio Morricone

That's fine. The Magnolia's multiple genre tag (GENRE=Pop, Soundtrack) is read correctly: I can find Magnolia album under "Pop" AND under "Soundtrack".

However, I would like to customise more deeply my genre tree, for example including a "No genre" node for untagged files or a "Other genres" node for non-standard genres according to my classification.
So, instead of plain "genre", I have to use a formula. My formatting string in Albumlist would be something like this: $if2(%genre%,--NO GENRE--)|artist|album|title

I obtain a tree like this:

...[+]----NO GENRE--
...[+]--Alternative
...[+]--Electronic
...[-]---Pop
.............[+]---Madonna
...[-]---Soundtrack
..............[+]---Ennio Morricone
...[-]---Soundtrack, Pop
..............[-]---Aimee Mann
...............................[+]--Magnolia

Unlike plain "genre", %genre% can be used within a formula. However, %genre% doesn't read the Magnolia's genre tag (GENRE=Soundtrack, Pop) as multiple value tag but just as a single value tag. In other words, "%genre%" behaves just like plain "genre", only, it doesn't read multiple tags correctly.

Do you know any workaround? How can I obtain a tree like this?

...[+]----NO GENRE--
...[+]--Alternative
...[+]--Electronic
...[-]---Pop
.............[+]---Madonna
.............[-]----Aimee Mann
...............................[+]--Magnolia
...[-]---Soundtrack
..............[-]---Aimee Mann
...............................[+]--Magnolia
..............[+]---Ennio Morricone

Sorry if I bored you and thank you very much for your help.
foosion
QUOTE
Do you know any workaround? How can I obtain a tree like this?

You can't, unless you modify the album list source code.
marcomk
QUOTE(foosion @ Sep 3 2004, 04:07 PM)
QUOTE
Do you know any workaround? How can I obtain a tree like this?

You can't, unless you modify the album list source code.
*



Fair enough. Thanks wink.gif
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.