Contents
Menu commands
Search dialog
Builtin filter modes
Preferences
FAQ
- Why do I get no results when searching the media library?
- Why does the help command not work?
- How do I make playing the selected result item the default action?
Choose Libary/Database Search from the main menu to show the search dialog.
To search the database for songs with the same artist as a given song, select that song (either in playlist, albumlist, or any other place that allows the use of standard foobar2000 context menu commands) and choose Search for Same/Artist from the context menu. This command only shows up, if you have a format preset called "artist" (chararcter case is ignored, so it may be called "Artist" as well) and the Search for Same submenu is inserted into the context menu. In addition, the "artist" preset has to be enabled for the context menu in the Database Search preferences.
The Search for Same/More... command lets you choose an arbitrary format preset to use for the search. Additionally, you can define your own format presets and enable them to be directly available in the Search for same submenu.
To show the help file, run the Help/Database Search Online Help command from the main menu.
The search dialog contains several elements that allow you to control the search parameters and display information.
Keyboard shortcuts that are available in the search, format, pattern, and filter mode fields only:
Keyboard shortcuts that are available in the resultlist only:
Keyboard shortcuts that are available in the whole dialog:
Mouse interaction for the result view works as in the playlist view of the Default User Interface, except the result list cannot be edited. The notable differences are:
Phrase based modes generally take the whole pattern without breaking it up into words, and match it against the reference string which is derived from the item to be tested by using the format script from the format preset. See the description of the individual mode
This filter applies the format given in the format field to any item that is tested. If the content of the pattern field is identical to the resulting string (ignoring character case), the item passes the test. If the pattern field is empty, no item passes the test.
Example:
[%artist%]
dave matthews
This filter applies the format given in the format field to any item that is tested. If the content of the pattern field is a prefix of the resulting string (ignoring character case), the item passes the test. If the pattern field is empty, no item passes the test.
Example:
[%artist%]
dave matthews
Note: The name of this mode is not misspelled by accident. It is deliberately written as it is. It is an anagram of Find phrase.
This search mode is partly a joke based news about results from researchers at an English University which spread through the Internet quite a while ago. You can easily test for yourself that you an still reads words where the middle letters have been scrambled. This search mode uses a related approach. However, it does not break up the input into words. It simply tries to find the first character followed by an anagram of the middle characters followed by the last character in the reference string. If the input consist of only one or two characters, it tries to find exactly the input instead.
Example:
[%title%]
trehe
PS: Are you still taking this filter mode seriously? :)
Despite their name, these filter modes can be used to search much more than just individual words. They break up the pattern into a list of whitespace delimited terms, each of which represents a single condition. The individual modes differ in the number of conditions that an item has to satisfy to be included in the result.
For the purpose of the word based modes, a word is sequence of characters that does not contain whitespace and starts with any character except plus sign (+), minus sign (-), or double quotation mark ("). A phrase is a sequence of characters delimited by double quotation marks. For example,
king for "a day"
is parsed as the two words "king" and "for" followed by the phrase "a day". On the other hand,
king"dom"
is parsed as a single "word". A word or phrase condition term is satisfied, if the word or phrase is contained in the reference string; character case is ignored, and the word or phrase does not need to match on word boundaries in the reference string.
To test the presence of field, write the field name enclosed in percent signs, like this:
%album artist%
Note that you can use spaces in the field name. If the field name starts with two underscores, the filter scans for a technical information field, otherwise it scans for a regular metadata field. It does not use titleformatting, so field remappings have no effect here. However, you can use the wildcard characters '?' and '*' in the field name. A question mark matches a single character, while the multiplication sign matches zero or more arbitrary characters. If there is any field that matches the name pattern, the condition is satisfied.
In addition to merely testing the presence of a field, you can also test its value in various ways. To do so, enter the name of the field enclosed in percent signs followed by one of the comparison operator characters described below and finally a word or phrase that specifies the value the field is tested against. The field name can contain wildcards like when testing for the presence of a field. In this case the condition is satisfied, if any of the fields matching the given pattern passes the test. Character case is ignored for both the field name and the given value. Note that there may be space between the fieldname and the comparison operator, or between the comparison operator and the value.
To test if a field value equals a given text, use the '=' (equal sign) operator.
%artist%="dave matthews"
To test if a field value contains a given text, use the '~' (tilde) operator.
%artist%~king
To test if a field value sorts before or after a given text, use the '<' (less-than sign) or '>' (greater-than sign) operator. The sorting order is lexicographically, that is it compares two texts character by character, with the exception of numeric fields which are compared as natural numbers.
%__bitrate%<128
Any of the above condition terms can be prefixed with a + or - character. A condition term that has one of these prefixes must always be satisfied (+) or not satisfied (-), in either case it is not counted when determining the number of conditions that has to be satisfied.
Examples:
[%title%]
king for day +%artist%=jamiroquai
This filter mode requires that all conditions are satisfied.
This filter mode requires that at least one condition is satisfied.
This filter mode requires that at least half of the conditions are satisfied. If the number of conditions is odd, it rounds up.
You can use this filter mode to view all the items in the source.
This filter tests whether information about an item is available in the database. If no information is available, the item passes the test.
This filter mode interpretes the pattern as a query in playlist generator query syntax and uses that to filter the source items. If the pattern cannot be interpreted as a valid query, no items are returned.
The Database Search preferences page is a subpage of the Media Library page. There are multiple tabs on the Database Search preferences page. See below for a description of each.
On the Title Formatting tab you can modify the formatting scripts that affect how items are displayed in the result view, waht extra information is displayed in the status bar, and how items from unsorted sources are sorted. From the builtin sources, ony the Media Library is affected by the sorting script.
The Display tab contains the settings for the colors and font used in the result view. The text color can be overridden in the display formatting script by using color codes.
This tab is used to manage the format presets. In addition, it contains the settings for the Search for Same function.
This page currently contains two options:
Go to Preferences/Media Library and check the settings there. You need to have at least one directory added there.
The help command opens the online help file, so you need to be connected to the internet. If your browser displays a "File not found" error, check the URL first: if it points to http://www.stud.uni-karlsruhe.de/~uzbs/fb2k/html/foo_dbsearch_help.html you should get a newer version of the component. Otherwise please post about this in the Database Search thread on the foobar2000 forum; your post should include the URL the component tried to open.
To do this, you need to set the default action to the Play command. This command is provided by foo_utils, so you have to install this component to get this functionality.
more to come...