Help - Search - Members - Calendar
Full Version: Custom sort in albumlist
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
Lej
So I got quite a lot of music from different tv-series where each album got songs by several artists.

I got them stored like this:
CODE
TV-Series
     Album1
           Song1
           Song2
           Song3
     Album2
           Song1
           Song2
           Song3


If I sort them by any of the standard sorting options I will end up with a mess. What I would like is the album list to show it as following:

CODE
[name of the FOLDER with the tv-series]
     [ALBUM name (OR foldername if there is no album name)]
           [tracknumber + title (OR filename if there is no title) ie 01. Song]
           [02. Song]
           [03. Song]
     [ALBUM name (OR foldername if there is no album name)]
           [01. Song]
           [02. Song]
           [03. Song]


I've been looking around for tutorials and tried a few times but I'm not sure how to do it. Help greatly appreciated smile.gif
Frank Bicking
foobar2000 0.8:
CODE
$directory(%_path%,2)|$if2(%album%,$directory(%_path%))|$num(%tracknumber%,2). $if2(%title%,%_filename%)

foobar2000 0.9 beta:
CODE
$directory(%path%,2)|$if2(%album%,$directory(%path%))|%tracknumber%. %title%

Titleformat Reference
Lej
Maybe I didn't explain it carefully enough but what you suggested doesn't do exaclty what I wanted.
I'll try to be more careful now, this is how I want it:
CODE
[All Music]
     [TV-Series1 folder name]
           [Album1]
                 [Song1]
                 [Song2]
                 [Song3]
           [Album2]
                 [Song1]
                 [Song2]
                 [Song3]
     [TV-Series1 folder name]
           ...


What you suggested result in what I was stuck at:

CODE
[All Music]
     [Album1]
           [Song1]
           [Song2]
           [Song3]
     [Album2]
           [Song1]
           [Song2]
           [Song3]
     ...
Frank Bicking
Added underscores to several fields for 0.83.

Sorry, forgot how title formatting works there, the reference is for 0.9 only.
Lej
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.

unsure.gif

[EDIT]

Ah yes, works like a charm now! Thanks a lot biggrin.gif

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! smile.gif

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]
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.