Quick search

Quick search

Quick search

Quick search lets you define your own query.

In typical music applications you have a possibility of browsing the library by artist, album, year, sometimes by year/album (of course O!MPD also offers this). But what if you want to display for example all pop albums released in the 80’s? Usually it is not possible. O!MPD lets you do it. Just use Quick search!
quick-searchTo define this search you need to edit file include/config.inc.php.
Open it and find section Quick search. Then add the following line:

$cfg['quick_search'][7] = array("Pop of the 80's","genre ='Pop' AND ((album.year BETWEEN 1980 AND 1989) or comment like '%80s%')");

[7]– position in Quick search list
"Pop of the 80's" – name displayed in Quick search list
"genre ='Pop' AND ((album.year BETWEEN 1980 AND 1989) or comment like '%80s%')" – SQL query WHERE clause

You can use following fields in query:
album.artist – name of the album artist (ALBUMARTIST tag)
album– album title (ALBUM tag)
album.year – year of the album (YEAR tag)
title– track title (TITLE tag)
audio_bits_per_sample – file bit depth (16, 20, 24, 32…)
audio_sample_rate – file sampling rate in Hz (44100, 48000, 88200,….)
comment – any comment you added to file (COMMENT tag)

BTW: in this case you can use another O!MPD feature: order by decade.  Just select Pop from Genre list, choose Decade as order method and scroll to 1980’s.

Quick search lets you build more interesting queries: you can easly find for example all HD albums:

$cfg['quick_search'][5] = array("HD Audio","audio_bits_per_sample > 16 OR audio_sample_rate > 48000");

But the most powerful is using Quick search in conjunction with comments.

Leave a Reply

Your email address will not be published. Required fields are marked *