Help - Search - Members - Calendar
Full Version: Built-in View by directory structure - How to modify?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
pstrg
I would like to hide certain files and directories on the built-in view by directory structure.
However, the code for that built-in view is not explicit and I have not been able to mimic it to later modify it.

Is there a means to introduce changes?
Or else, what's the code of this view?
NEMO7538
The code is not available, but (depending on how well your directories are organized) you may mimic it using $directory field and %path% functions, among others.
Check the titleformat_help in the program directory for more information.
pstrg
Alas, reading my post I now realize that it was very poorly written; may I apologize.

I refer to Album List Panel (foo_uie_albumlist); also, I'm familiar with titleformating and use it to get some fairly complex views for Album List Panel.

What eludes me is the way Album List Panel built-in View by directory structure deals with depth (I call it built-in because it's already there to choose, but its code doesn't appear on the General | Views list - only user created/modified ones are on the list).

If I choose the Album List Panel built-in View by directory structure the resulting tree shows (depending on unknown criteria probably related to %path_sort%),
- the very first directory level,
- the last (the music file themselves) or
- in-between.
I'd like to control that but could not mimic the structure using the available functions and fields.

(Note that I didn't want the program code, just the TAGZ code of that view).
Frank Bicking
The directory structure view is not based on titleformatting.

Reason: It's based on the relative media library path, which means that it merges multiple music folders.

If you for example add "D:\Music" and "E:\Music" to your media library, with the following contents:

CODE
D:\Music\Artist A\Album 1
D:\Music\Artist B\Album 2
E:\Music\Artist B\Album 3
E:\Music\Artist C\Album 4

the directory structure view merges them as follows:

CODE
All Music
+-- Artist A
    +-- Album 1
+-- Artist B
    +-- Album 2
    +-- Album 3
+-- Artist C
    +-- Album 4

The functions that deal with that are built-in.

You can create a view that is close to it with a titleformat pattern like this:

CODE
$replace(%path%,D:\Music\,,E:\Music\,,\,|)

But that requires to explicitly include the paths of the music folders in the pattern.

PS: It would be helpful if you could mention how you would like to modify this view.
pstrg
QUOTE(Frank Bicking @ Nov 4 2007, 08:22) *

PS: It would be helpful if you could mention how you would like to modify this view.

The problem I face is as follows.

I use a (weird?) method to catalog my CD collection: for each item I use a fake, very small MP3 (1 kib, 50 ms).
These non-playable files are there just to allow me to put tags on them (incidentally I use album, disc, track, genre, composer, title, subtitle, artist, ensemble (band), conductor, date, comment). To make it clear they're not to be played, they have a different color on the list.

The built-in View by directory structure correctly exhibits a directory structure, but those fake files somehow appear on the 'root' level, despite of the fact that they're in fact 3 levels deep - their full path is D:\Music (NP)\CD\{file}.mp3.
Since they show up at the 'root' level and there are thousands of them, they obviously pollute the view; to make they at least to appear last I renamed them all so that they start with zz.
I don't know why they do not appear behind CD (and why CD doesn't appear behind Music (NP)) as they should.

In sum, the built-in directory view is quite adequate, except for the problem described above...

Frank Bicking
Looks like this is caused by the functionality I described earlier.

Is "D:\Music (NP)\CD\" added as a music folder on its own at Preferences, Media Library?

If yes, then a solution would be to move the whole directory to your real music folder, to prevent both from being merged in the directory structure view. So for example, if your actual music is stored in "D:\Music", save the files to "D:\Music\(NP)\CD\".
pstrg
QUOTE(Frank Bicking @ Nov 4 2007, 20:33) *

If yes, then a solution would be to move the whole directory to your real music folder, to prevent both from being merged in the directory structure view.

Followed the suggestion and it worked.
I did not realize that each entry in Music Folders -- even though merged alphabetically in the view -- is treated as a separate tree.

Only disadvantage (and the reason why I used to have separate entries) is that I won't be able to rescan only a tree known to have been modified -- rescans will take a little longer (but I can live with that).

Many thanks.
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.