Help - Search - Members - Calendar
Full Version: Playlist tree problems and other programming related stuff
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
emkeyen
Hello all,

Quite a newbie on Foobar 2000. I've got some programming experience tho in various OO and scripting languages. Though, Foobar is a tough nut. Especially when it comes to documentation which, frankly, is very hard to find.

So, I see people are doing custom visual interfaces and stuff which are pretty interesting, and it would be nice to try out some of them and take a look at the sources. Is there a skins gallery and download somewhere?

My main concern for the moment is though with the playlist tree panels where I just cant figure out how its supposed to work. I've been scrolling up and down both the titleformat reference and searched for the referenced playlist generator docs without finding them. For example, how do I do a query that filters out any playlist files so that they are not included in a query?

Thanks a bunch
Em.

emkeyen
Thanks. Thought I'd share a small snippet of code then. This is useful if you are, like me, on a laptop with different external disks and network shares available on different locations. I use the playlist tree and @drop so I can refresh locations independently.

What it does is this:
Remove long path.
If file is tagged, do below. Otherwise, display filename.
If file has track number, display track number.
If directory two steps above in hierarchy contains Artist, display "01 - Title"
Otherwise, assume compilation disk, display "01 - Artist - Title"

So that; properly tagged:
Earth - (1993) Earth 2
+- 01 - Seven Angels
(...)

Tagged without track numbers:
Earth - (1993) Earth 2
+- Seven Angels
(...)

No tagged:
Earth - (1993) Earth 2
+- 01 - Seven Angels.mp3
(...)

and similarly for compilations, but with an injected Artist if available:
(2006) Ultra Electro
+- 01 - Gorillaz - Dare [Soulwax Remix]
(...)

etc.

CODE

Source:
@drop<d:\My Documents\My Music>

Format:
$replace(%path%,D:\My Documents\My Music\,,\,|,%filename_ext%,)
|
$if(%title%,
$if(%track%,%track% - )
$if($strstr($directory(%path%,2) %directory% ,%album artist%),,%album artist% - )
%title%,%filename%)


Notice that you need to edit the main directory (with backslash) in the first $replace(...). It would be neat if it could be automatic with a %drop% but I couldn't find anything like it in the wiki pages.

Now I got Foobar working as I want. Hope someone else finds this useful.

Yours all
Em.
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.