Me doing something wrong would be a very possible explanation.
What I did was go into the "album list" preferences. Added a new "View" and pasted your code there. Then in the album list window chose the new view.

[EDIT]
Ah yes, works like a charm now! Thanks a lot

And one question. If I would use deeper levels of subfolder is it enough to change the 2 in $directory(%_path%,2) to a higher number? Becuase I notice that in one Album folder I had 3 CD folders ( the album was split on several CDs) and the CD folder ended up beeing shown on the All Music level instead of inside the Album folder.
[/EDIT]
[EDIT2]
Ok so I sat down and read some on the subject and wrote something ugly but working.
It lists a few layers of sub folders from the "root" (called Music in my case).
If a folder contains files it creates an Album folder in the view instead and in it it lists the files. If you know a little you can easily make it go deeper into subfolders or customize it.
Thanks for the links and all help!
CODE
$if($stricmp($directory(%_path%),Music),[$num(%tracknumber%,2). ]$if2(%title%,%_filename%),)
$if($stricmp($directory(%_path%,2),Music),$if2(%album%,$directory(%_path%,1)),)
$if($stricmp($directory(%_path%,3),Music),$directory(%_path%,2),)
$if($stricmp($directory(%_path%,4),Music),$directory(%_path%,3),)
$if($stricmp($directory(%_path%,5),Music),$directory(%_path%,4),)
|
$if($stricmp($directory(%_path%,2),Music),[$num(%tracknumber%,2). ]$if2(%title%,%_filename%),)
$if($stricmp($directory(%_path%,3),Music),$if2(%album%,$directory(%_path%,1)),)
$if($stricmp($directory(%_path%,4),Music),$directory(%_path%,2),)
$if($stricmp($directory(%_path%,5),Music),$directory(%_path%,3),)
|
$if($stricmp($directory(%_path%,3),Music),[$num(%tracknumber%,2). ]$if2(%title%,%_filename%),)
$if($stricmp($directory(%_path%,4),Music),$if2(%album%,$directory(%_path%,1)),)
$if($stricmp($directory(%_path%,5),Music),$directory(%_path%,2),)
|
$if($stricmp($directory(%_path%,4),Music),[$num(%tracknumber%,2). ]$if2(%title%,%_filename%),)
$if($stricmp($directory(%_path%,5),Music),$if2(%album%,$directory(%_path%,1)),)
|
$if($stricmp($directory(%_path%,5),Music),[$num(%tracknumber%,2). ]$if2(%title%,%_filename%),)
[/EDIT2]