Author Topic: Modern Search Bar - Unified search bar with fuzzy matching  (Read 3835 times)

fiso64

  • Jr. Member
  • **
  • Posts: 76
Modern Search Bar  

A modern, customizable search bar plugin for MusicBee that provides unified search across your music library.  Also functions as a command palette that can search MusicBee and plugin commands.
  
Github: https://github.com/fiso64/MusicBeeSearchBar

 

Features  

- Unified Search: Search for artists, albums, and songs all in one place  
- Fuzzy Search: Intelligent matching that always prioritizes the best results  
- Filtering: Use prefixes to filter results:  
  - a: for artists  
  - l: for albums  
  - s: for songs  
  - p: for playlists
  - > for commands
- Customizable Actions: Configure different actions for each result type:  
  - Default click / Enter  
  - Ctrl + click / Enter  
  - etc.  
- Action Types:  
  - Play (with optional shuffle)  
  - Queue Next  
  - etc.  
- Quick Launcher: Can be used as a quick song/album selector while MusicBee is hidden  

Installation  

1. Download the latest release here.  
2. Extract the files into the MusicBee Plugins folder (usually located at MusicBee\Plugins).  
3. Restart MusicBee.  
4. Set up a hotkey in MusicBee's preferences to show the search bar.  

Keyboard Shortcuts  

- Alt+D: Focus search box  
- Alt+R: Execute artist action for current result  
- Alt+A: Execute album action for current result  
- Ctrl+P: Open configuration  
- Enter: Execute action  
- Ctrl/Shift + Enter: Execute alternative actions  

Command Palette Notes  

The command palette feature (activated with the > prefix) can be used to search and execute built-in or plugin commands. Note:  
- Some commands may fail to execute, or give an error  
- Some command names might differ from how they appear in MusicBee's context menus  

If you find inconsistent command names or broken commands, you can create an issue here.
Last Edit: May 09, 2025, 08:48:54 PM by fiso64

TraceAmountsOfOlive

  • Newbie
  • *
  • Posts: 1
Actually incredible that I thought to look for literally this exact plugin and it was made less than a week ago. Amazing work! Any plans to add more things you can search for, like playlists?

aktor

  • Sr. Member
  • ****
  • Posts: 336
There is a scaling bug. The second row of the results (Artist) is only half visible. I have windows 125% scaling.

Berwhale

  • Newbie
  • *
  • Posts: 2
I like the look of this, but I can't save any settings for the plug-in.  I'm running MusicBee 3.6.9171. 

fiso64

  • Jr. Member
  • **
  • Posts: 76
Actually incredible that I thought to look for literally this exact plugin and it was made less than a week ago. Amazing work! Any plans to add more things you can search for, like playlists?
I have added playlist search in the new version (fixing a few important bugs along the way). If you have a dedicated playlists explorer tab, I recommend setting the default enter action to SearchInTab with Use Left Sidebar and Focus Main Panel set to true.

Arbitrary tag search is on my todo list.

There is a scaling bug. The second row of the results (Artist) is only half visible. I have windows 125% scaling.
This is fixed in the new version

I like the look of this, but I can't save any settings for the plug-in.  I'm running MusicBee 3.6.9171.  
yes, some settings weren't saving, sorry. fixed in the new version


https://github.com/fiso64/MusicBeeSearchBar/releases/latest
Last Edit: February 09, 2025, 04:47:35 PM by fiso64

aktor

  • Sr. Member
  • ****
  • Posts: 336
I can confirm that bug is fixed. It also works nice as a track info panne. Nice.
Suggestions:
- make it a floating window so it can be moved around
- make the corners round
- change from artist to album artists so it doesn't display band members role or instrument

DanielN

  • Newbie
  • *
  • Posts: 18
I really like the idea.
Unfortunately it is incredibly laggy on my system. (could be because I have a 12 year old potato or because my library is on my cheap excuse for a NAS)


fiso64

  • Jr. Member
  • **
  • Posts: 76
Sorry for the performance issues. I only tested it on my desktop with a small library of around 10000 tracks and I haven't bothered to optimize it at all.

There are many low-hanging fruit there that will make it faster. I'll publish an update as soon as I can, although unfortunately that might take a few weeks as I'm currently not at home. I'll also implement the other suggestions.

fiso64

  • Jr. Member
  • **
  • Posts: 76
The new version https://github.com/fiso64/MusicBeeSearchBar/releases/latest has improved performance and prevents the UI from slowing down when searching is slow.

If it is still slow to load, please let me know if it's the initial startup loading or the searching that is slow so that I can understand what to focus on.

leftdevices

  • Newbie
  • *
  • Posts: 7
Fantastic work! This reminds me of stuff like Launchy, just very nice to use. I see prefixes for artists etc, but can we switch between 'Entire Library' and 'Local Node only' as we can in the built-in search bar?

fiso64

  • Jr. Member
  • **
  • Posts: 76
Fantastic work! This reminds me of stuff like Launchy, just very nice to use. I see prefixes for artists etc, but can we switch between 'Entire Library' and 'Local Node only' as we can in the built-in search bar?
It would not be easy to implement because the musicbee api does not provide a way to get the tracks of the current local node. Besides, I don't really see why one would want that feature. When I type an artist or album into the search bar, I want to find this thing as quickly as possible. I don't want to worry about whether or not this artist/album/song appears in the current node. Surely typing one or two more characters of the actual item you want is easier and faster than fiddling with current node/entire library toggle.
Last Edit: February 23, 2025, 10:43:13 AM by fiso64

usraek

  • Jr. Member
  • **
  • Posts: 67
This is so cool, thank you for this!


I've been playing around with it and there's a couple things:

1. the default controls for queue next/last are inverse to MusicBees, i.e. Queue Next in MusicBee is Ctri+Shift+Enters, and your plugin defaults Ctrl+Enter.

2a. I've config'd artist search to open a new tab,  and one of the options is "go back before opening filter", what does that mean?
2b. For that same search, I've set the focus to main panel option, that does seem to highlight something, but when the new tab is opened there's a hovering navigation (left?) sidebar that opens and won't close until i click it. I have the left sidebar set to 'hide' in the Arrange Panels settings, so that may be the cause?

Cheers again, this is so nice
Last Edit: February 25, 2025, 07:14:51 AM by usraek

leftdevices

  • Newbie
  • *
  • Posts: 7
@fiso64 absolutely okay with the current state if it's not possible, I just wanted it so I could limit my search to either Library or Inbox (which I use for music that hasn't had its tags/images etc checked)
Wonderful plugin either way, thanks!

fiso64

  • Jr. Member
  • **
  • Posts: 76
1. the default controls for queue next/last are inverse to MusicBees, i.e. Queue Next in MusicBee is Ctri+Shift+Enters, and your plugin defaults Ctrl+Enter.
I'll have a look at the default mb controls and fix this for the next release, although my plugin has ctrl+enter to play and shift+enter to queue, not ctrl+enter as you say.

2a. I've config'd artist search to open a new tab,  and one of the options is "go back before opening filter", what does that mean?
2b. For that same search, I've set the focus to main panel option, that does seem to highlight something, but when the new tab is opened there's a hovering navigation (left?) sidebar that opens and won't close until i click it. I have the left sidebar set to 'hide' in the Arrange Panels settings, so that may be the cause?
"go back before opening filter" means call the "General: Navigate Back" command after going to the configured tab and before opening the filter. I added this because I have a dedicated albums tab where I have it open my albums (as in the demo gif), and this option prevents the navigation stack from getting filled up with all the albums I search for, so that I can just press "navigate back" only once when in that tab to view all my albums again.

Regarding focus main panel I unfortunately don't know how to make it work for every setup. Musicbee actually added a way to focus it by pressing the "goto text search box" hotkey again when the search box is focused, but it is bugged: https://getmusicbee.com/forum/index.php?topic=41683. So I did it my own way, but which seems to be broken as well.
Last Edit: February 25, 2025, 11:58:10 AM by fiso64