I currently have Facets set up with the standard Genre / Album Artist / Albums panes, but I would like to set up a top-level pane that basically displays only the music contained in several top level folders. I have my music sorted in my library in the following top level directories:
\Artists (my main music library)
\New (new music)
\Archive (Stuff that I don't want to show up in my main library, but that I want to keep)
Is there a way to have a Facet pane that filters by the contents of these top level folders? I'm having trouble formulating the syntax, but maybe there's a simple way to do this using %directoryname%?
The easy way would be to add a 'Folder'
pane as the left most column. (The built-in Facets column that shows folder structure - right-click column header > Columns > Folder
). It should show the folders starting inside the monitored music folder, so if they are actually "top-level" folders, you would have to be monitoring the root drive (in Library > Configure > under Music Folders
) to see those folders. In other words, if you are monitoring each individual folder, that would not work.
Otherwise you could setup a column using $if
functions to filter based on the %path%
^ IF the %path% HAS string \Artists\ (use backslashes to get exact match of folder name), THEN show text "Artists". Following that just add additional $if
functions for each folder -
^ Show "Artists", ELSE "Compilations", ELSE "New"
An alternative way would be to get the actual folder name with -
Extracts directory name from the file path; goes up by n levels. - Title Formatting Reference (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference#.24directory.28path.2Cn.29)
However, if you keep music files in differing levels of folders (perhaps a "Disc 1" folder for some albums but not others), that would not show the correct folder, since it is relative to the file location. Every file in the library would have to be in the same folder level.
Your first suggestion worked brilliantly. I would have never figured it out on my own, so thank you very much!
Lately I've been getting into using the Facets Search function, and after using Facets for years I really do wonder why it took me so long. Showing/filtering the contents of particular folders is pretty easy, but you can create more complex filters.
A filter without any syntax will show nothing. If the folders you mentioned are all on the same level then a filter like this would show you the contents of the Artist folder and it's subfolders.
%path% HAS "Artists"
If there's an Artists sub-folder under New (for example) you'd filter it out like this.
(%path% HAS "Artists") AND (NOT %path% HAS "New")
Here's a couple of examples that won't be completely relevant to you (I have a different folder hierarchy) but it'll give you an idea. I have two top level folders named MP3 and FLAC, for obvious reasons, and both contain a subfolder named Miscellaneous. This would show just the contents of the Miscellaneous MP3 sub-folder.
(%path% HAS "MP3s") AND (%path% HAS "Miscellaneous")
To make it more funky, I have the the Tabs UI with 5 tabs containing different Facets configurations for sorting.
Screenshot #1 below is the contents of just that MP3s/Miscellaneous folder.
Screenshot #2 is the contents of the MP3s folder and subfolders, but only if the artist is Joe Cocker.
Screenshot #3 is the same MP3/Joe Cocker filter, sorted using the second Facets configuration (sorted by album when clicking on an album name).
(%path% HAS "MP3s") AND (%artist% HAS "Joe Cocker")