Foobar2000:Components/Facets (foo facets): Difference between revisions
(→Layout) |
|||
Line 25: | Line 25: | ||
===Toolbar=== | ===Toolbar=== | ||
[[Image:Foobar2000-Facets-Toolbar.png|none|frame|Facets toolbar]] | |||
To control the toolbar, enable the layout editing mode, and right-click on it. | To control the toolbar, enable the layout editing mode, and right-click on it. | ||
* "Bottom-dock toolbar" moves the toolbar below the panes. Repeating this action will move it back to the top. | * "Bottom-dock toolbar" moves the toolbar below the panes. Repeating this action will move it back to the top. | ||
* Unchecking "Show the toolbar" disables the toolbar entirely. | * Unchecking "Show the toolbar" disables the toolbar entirely. | ||
* To restore the toolbar, right-click on one of the splitters between two panes, and re-enable "Show the toolbar". | * To restore the toolbar, right-click on one of the splitters between two panes, and re-enable "Show the toolbar". | ||
====Source==== | ====Source==== | ||
Toggles between browsing and searching in the contents of the media library and the current playlist. Can be set to automatic to display the playlist by default, and to switch to the library if the library selection playlist is active. | Toggles between browsing and searching in the contents of the media library and the current playlist. Can be set to automatic to display the playlist by default, and to switch to the library if the library selection playlist is active. | ||
====Filter==== | ====Filter==== | ||
Revision as of 20:03, 17 August 2011
Media library viewer with multiple columns, album art, statistics, and search functions.
Usage
Integrate into the user interface
Enable the layout editing mode at "View", "Layout" to manually add Facets as a UI element.
Popup window
Choose "Facets" from the "Library" menu to open it in a new window. If a Facets UI element has already been integrated into the user interface, this will focus the existing instance. Hold Shift when selecting the menu item to force open a new window. Note that in order to edit the layout, Facets' own layout editing mode toolbar will have to be enabled.
Layout
Panes
By default, Facets is split into three panes. By enabling the layout editing mode and right-clicking on one of them, panes can be removed, and new panes can be insert before or appended after the selected one. The cut, copy, and paste commands can be used to reorder panes, or to transfer them between different Facets UI elements. Panes can be arranged next or below to another, to toggle the orientation, right-click on one of the splitters between two panes while in layout editing mode, and select "horizontal" or "vertical".
Toolbar
To control the toolbar, enable the layout editing mode, and right-click on it.
- "Bottom-dock toolbar" moves the toolbar below the panes. Repeating this action will move it back to the top.
- Unchecking "Show the toolbar" disables the toolbar entirely.
- To restore the toolbar, right-click on one of the splitters between two panes, and re-enable "Show the toolbar".
Source
Toggles between browsing and searching in the contents of the media library and the current playlist. Can be set to automatic to display the playlist by default, and to switch to the library if the library selection playlist is active.
Filter
Selects one or multiple frequently used searches. Panes are automatically filtered according to the results. Once a filter has been selected, the toolbar button can be clicked to quickly enable or disable it. Note that some predefined filters require the playback statistics component.
Search
Filters facets based on either a simple search, which looks for the entered terms in all metadata fields and file properties, or the advanced query syntax. "Beatles" for example could typically be found in the artist or album artist tag, and in the file path. "FLAC" would select all flac-encoded files based on the codec or file extension. Note that there are two settings at Preferences, Advanced, Tools, where the search can be set to either exclude or to be restricted to certain fields. Queries on the other hand allow for a much more refined search. Click on the search help button ("?") to open the syntax reference.
To focus the search toolbar, press F3 from a Facets pane, or assign a keyboard shortcut like Ctrl+F to [main] / Library / Facets.
Search results
Click on the dropdown button to display a menu for filter and search results. When browsing the library, the default action is the same as the double-click action, which can be configured at Preferences, Media Library, Facets. For playlists, clicking on the button starts playback of the first track in the search results.
Search help
Opens the query syntax reference in the browser.
Layout editing mode
Activates the integrated layout editing mode. Only available for the standalone window opened from the Library menu, and the autoplaylist editor dialog. Embedded UI elements automatically detect the layout editing mode of the default user interface.
Columns
Each pane can display one or multiple columns. To change them, right-click on one of the column headers.
Example
Set the first pane to genre, the second to artist, and the third to album. In the third one, enable multiple columns and add the date column. Resize and reorder them to your liking.
Column patterns
Columns are based on title formatting. Their patterns can be edited at Preferences, Media Library, Facets.
Missing fields
Depending on the pattern, missing fields are treated in different ways:
Syntax | Tracks without the specified field | Summary item |
---|---|---|
%field% | Listed under "?". | Contains all tracks. |
[%field%] | Not listed at all, because the result is empty. | Only contains tracks where the field exists. 1 |
$if2(%field%,Unknown) | Listed under "Unknown". | Contains all tracks. |
- The rationale for ignoring empty results in the summary item is that, for example, selecting "All (# albums)" should only select actual albums, and not unsorted tracks without an album field. To display all items in the next pane, including those without the field, unselect the summary item with Ctrl-click if necessary.
Multivalue fields
Some fields like genre typically have multiple values. Facets makes some additions which allow values to be split into individual items:
Syntax | Description |
---|---|
%<field>% | Checks one or more metadata fields according to the title formatting definition of the specified field. For the first field that is found, multiple values are split into separate items. |
$meta_branch(field) | Splits multiple values of specified field into separate items. |
$meta_branch_stripprefix(field) | Same as above, additionally removes leading "The" or "A" from each value. |
$meta_branch_swapprefix(field) | Same as above, additionally moves leading “The” or “A” to the end. |
$meta_branch_remap(field) | Same as %<field>%. |
$meta_branch_remap_stripprefix(field) | Additionally removes leading "The" or "A". For use instead of nonworking $stripprefix(%<artist>%). |
$meta_branch_remap_swapprefix(field) | Additionally moves leading "The" or "A" to the end. For use instead of nonworking $swapprefix(%<artist>%). |
Note that some title formatting functions are incompatible with fields that have been split this way. This applies to string comparison and measuring functions, such as $strcmp and $strstr, as well as any string manipulation function that removes a part of a string or inserts a substring by position, such as $left, $right, $cut, and $pad. Due to popular demand, compatible versions of $stripprefix and $swapprefix have been implemented as shown in the above table. It should be safe to use any function that replaces characters or sequences of characters, including $lower, $upper, $caps, $caps2, and $ansi.
Multiple patterns
Multiple patterns can be combined with | to display values from different fields in the same column. For example, %<artist>%|%<composer>% lists both artists and composers, which might be useful to create a list of persons regardless of their actual role.
Colors
Use < and > characters to dim or apply the highlight color to individual parts, with up to three levels, for example: <dimmed>, >highlight<, >>more highlight<<. Note that text in parentheses "(...)", brackets "[...]", and braces "{...}" is dimmed automatically. Color functions including $rgb, $hsl, $blend, and $transition are not supported.
To display the < and > characters, use $char(60) and $char(62).
Ignore leading "The" when sorting
Sorts items such as "The Beatles" among other entries starting with "B", while still displaying "The Beatles". Alternatively, columns can be changed to display "Beatles, The" or just "Beatles" by setting the pattern to, for example: $swapprefix(%artist%) or $stripprefix(%artist%), respectively.
Summary item of date columns
For columns containing "date" or "year" in their name, instead of the number of different dates, the summary item displays the number of years from the first to the last year (e.g. 5 years if the displayed dates range from 2007 to 2011; yes, five and not four). To be read as how many years an artist has been active or similar.
Folder columns
Folder columns are not based on title formatting. They display folders relative to the music folders set up at Preferences, Media Library, or, when browsing the current playlist, the full file path including the drive letter at the first level. Folder columns can be added to multiple panes to display several levels of subfolders. To mimic the typical appearance of some file managers, symbols at the right indicate the presence of subitems in the next pane.
Automatic column resizing
Multiple columns are automatically resized to use the full width. To avoid frequent readjustments, the size of statistics and columns named *date*, *year*, *number*, or codec remains the same if another column can be resized.
Statistics
Statistics are columns that display aggregated information for the tracks contained in each item.
Statistic | Description |
---|---|
Bitrate | Average bitrate. |
Duration | Total length. |
First release | First date or release date tag. |
Index | Position in the list, always ranges from 1 to the number of displayed items, regardless of how items are sorted. Useful to quickly see the top or bottom N elements. The summary item displays the total number of items. |
Items | Number of tracks. |
Last modified | Last time a track has been modified. |
Last release | Latest date or release date tag. |
Lossless ratio | Number of lossless files, in percent. |
Rating | Average rating from metadata, displayed as stars. The text color is dimmed according to the number of files that are rated, which indicates the reliability of the displayed value. This is also taken into account when sorting by rating. |
Subitems | Number of subitems in the next pane. |
Total peak | Highest peak of ReplayGain-scanned tracks. |
Total size | Sum of file sizes. |
Playback statistics
The following statistics require the additional playback statistics component.
Statistic | Description |
---|---|
First added | First time a track has been added. Based on %added%. |
First played | First time a track has been played. Based on %last_played%. |
Last added | Last time a track has been added. Based on %added%. |
Last played | Last time a track has been played. Based on %last_played%. |
Played | Number of times a track has been played. Based on %play_count%. |
Played duration | Sum over products of duration and %play_count%. Note that this counts tracks as fully played each time, even if playback was stopped after playback statistics counted the track as played (usually after one minute). |
Rating | Average rating, displayed as stars. Checks playback statistics %rating% first, then metadata field rating. The text color is dimmed according to the number of files that are rated, which indicates the reliability of the displayed value. This is also taken into account when sorting by rating. |
Display
Columns
By default, panes display their contents in a table-like view.
Album art
Additionally, one of three different views with album art can be selected:
Display | Comment |
---|---|
right labels | Best used with three or more columns. |
bottom labels | Best used with one or two columns. Requiring less space for labels, it is better suited for larger images. |
no labels | Can be used if all albums have album art and if they can be identified without any additional text. |
- Album art is loaded from the file sources defined at Preferences: Display and embedded images.
- Images can be resized/zoomed by holding the Ctrl key and rotating the mouse wheel.
- To change the order of displayed lines, reorder the columns in the header. The first line displays the first column, and so on.
- Text in the first line is always displayed in bold, which makes it an ideal choice for the column that best distinguishes individual items.
- The third and following lines are dimmed automatically. Use them for less important columns, such as dates or statistics.
- For a pane that lists albums, a recommended order would be album, album artist, and date.
Playlist interaction
Library selection playlist
In media library mode, Facets sends the current selection to foobar2000's library selection playlist. Note that it creates the selection playlist even if it has not been enabled at Preferences: Media Library to allow for a faster way of sending tracks to it. The "Activate when changed" option is ignored as well. To prevent selection changes from interrupting playback, Facets can be configured to preserve the playlist if the playing track is no longer selected, and to create a new selection playlist instead.
Double-click action
The double-click action is automatically set to "Send to current playlist" if the library selection playlist is used. It is only configurable when the selection action is set to "None".
Creating autoplaylists
To create an autoplaylist, right-click on a pane selection, or, if available, use the search results toolbar menu, and choose "Create autoplaylist". Autoplaylists are automatically updated to include tracks that match the search results or selected items. Note that their sort order is fixed to the "Default sort order" option at Preferences, Facets, unless the filter or search query used for the autoplaylist includes a SORT BY or SORT DESCENDING BY statement.
Editing created autoplaylists
To change the settings of a created autoplaylist, right-click on its playlist tab or playlist manager entry, and choose "Autoplaylist (Facets)". This will open the Facets view with the settings and selection used to create the autoplaylist. Note that in order to change the layout of panes, Facets' own layout editing mode toolbar will have to be added and selected. After clicking on the close window button (X), a dialog will ask if the changes should be saved.
Displaying contents of the current playlist
Instead of the media library, Facets can also be set to watch the active playlist via the source toolbar. Playlist views will follow the Facets selection and focus, but not the other way around.
Selection logic
Holding the Shift key when right-clicking on column headers reveals the selection logic option. It controls how tracks of multiple selected items are combined. The default behaviour "OR" selects all tracks that can be found in any of the selected items, while "AND" only selects tracks that can be found in all selected items. For example, in a genre pane, AND selection logic can be used to obtain tracks that have all selected genres.
Facets 1.0 release notes
Upgrading from older versions
All settings should be carried over to the new version. To be absolutely safe, backups of the current configuration can be kept, and, in case some settings were not imported correctly, put back later to repeat the update process with a fixed version. To locate the configuration files, hold the Shift key and select "Browse configuration folder" from the File menu.
Object | Description |
---|---|
foo_facets.cfg | Found in the configuration subfolder. Stores column patterns. |
theme.fth | Contains the current user interface layout, including Facets UI elements. |
playlists folder | Includes settings of created autoplaylists. |
Note that when installing an older version over Facets 1.0, the old configuration files will have to be put back in place. Due to new configuration formats, settings written by the new version cannot be ported back to the old one.
Keeping the old version by renaming the component DLL file will lead to conflicts and is not supported.
Default sort order option
A new setting at Preferences, Media Library, Facets now determines the order of media library items. "Sort incoming files by" at Preferences, Shell integration is no longer used when sending tracks to playlists. If this option has been changed, it is recommended to copy the pattern to the new location.
Displaying items with leading "The"
The option to ignore the leading "The" when sorting is still present. To change the display of affected items, instead of the previously available option, $stripprefix or $swapprefix can be used in the pattern of columns such as artist or album artist.
Setting colors in column patterns
Due to hardcoded colors being incompatible with different color schemes, title formatting functions to indicate colors - $rgb, $hsl, $blend, and $transition - can no longer be used in column patterns. Upgrading to the new version will not change existing columns, but color functions will no longer have any effect. Supported now are the < and > characters to dim or apply the highlight color to individual parts. Please see the title formatting syntax help for details and examples. Text in parenthesis is still dimmed by default.
New predefined filters
The search box no longer keeps a history of recently used searches. Instead, a new filter toolbar has been introduced to quickly access frequently used search queries, along with a new preferences page below Media Library, Facets.
Version numbering scheme
Facets now uses actual version numbers instead of the release date.
Change log
1.0
User interface:
- New Album art display modes
- Themed selection style with default background colors
- Automatic column size adjustment to use the full width
- Smooth mouse scrolling with middle-button.
- Mouse rectangle selection from all columns instead of only the first one
- Edit, Select all, Ctrl+A selects the summary item, option to hide it
- Thinner splitters, cut/copy/paste individual panes in layout editing mode
- Faster column sorting, initialization of multiple columns
- Previous scroll positions are restored after restart
Search:
- Filter toolbar for frequently used searches, new search results menu
- Reset button can be disabled or moved in front of the search box
- Search syntax supports DURING LAST, SORT BY, SORT DESCENDING BY
- Added entry to the library menu, assign as keyboard shortcut to focus the search
- Fixed search box redraw problems with classic visual style
Playlist interaction:
- New source mode to display contents of the current playlist
- Use media library selection playlist, faster playlist updates
- Playing selection playlist is preserved by default when changing selection
- Autoplaylist editor, opens Facets view that was used to create it
Preferences:
- Updated preferences page to use new buttons, refined looks
- Title formatting additions to deal with leading "The" of multivalue fields
- Color control syntax to <dim> and >highlight< text, removed $rgb support
- Default sort order option replaces usage of "Sort incoming files by"
Other:
- New statistics: first and last added, last release, lossless ratio, played duration, total peak
- Ratings use playback statistics database in addition to tags
- Optional AND selection logic, useful to find tracks with all selected genres
- Removed useless "Remove dead entries" context menu entry