Help - Search - Members - Calendar
Full Version: $if doesn't work for All-node in album list
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Support - (fb2k)
Mar2zz
When trying something I thought of when reading this topic I discovered something weird.

I made a view in album list with the following code:
CODE
$ifgreater(%play_count%,5,%<genre>%|[%album artist% - ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%,)


It creates genrename subnodes that are filled with songs with a playcount greater then 5, as I expected it would (though I was quite surprised that $ifgreater worked here...smile.gif). But when I click the All-node in that view it also has songs with a playcount less then 5. That's even more surprising, here All is more then the sum of its parts. To doublecheck I searched for those playcount LESS 5 songs in the subnodes, but I can't find them there. Also, a normal query gives me the same amount of songs as in all the subnodes.

Is this a bug, or is that something that is result of using $-operators in there? Anyway, it's not working as I think it would work (though that happens quite often to me with foobar).

I see now that All is All, as in All my music... Hmmm, that is something what I could expect of course... If i wasn't expecting the $ifgreater applying there too...
foosion
This is exactly the expected behavior. Any node in the album list can contain more songs than the sum of its children. For example, consider the following format:
CODE
[%artist%][|%album%]

Let's assume that there are three songs: one which has both ARTIST and ALBUM tags, one with only an ARTIST tag, and finally one that has neither. Then the output of the format string for each is:
CODE
Some Artist|Some Album
Some Artist


Observe that the output for the last song is empty. The album list does not discard this song, it merely puts it into the root node (which has the label All). The tree that would be generated for these three songs would look as follows:
CODE
+ All (contains all three songs)
  + Some Artist (contains songs 1 and 2)
    + Some Album (contains song 1)

Morale: If you want a filter, then put something in the Filter field.
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.