getmusicbee.com

MusicBee & Add-Ons => Customizations => Plugins => Topic started by: fiso64 on February 07, 2025, 12:11:44 AM

Title: Modern Search Bar - Unified search bar with fuzzy matching
Post by: fiso64 on February 07, 2025, 12:11:44 AM
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

(https://raw.githubusercontent.com/fiso64/MusicBeeSearchBar/refs/heads/master/demo.gif)  

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 (https://github.com/fiso64/MusicBeeSearchBar/releases/latest).  
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 (https://github.com/fiso64/MusicBeeSearchBar/issues).
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: TraceAmountsOfOlive on February 09, 2025, 06:49:12 AM
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?
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: aktor on February 09, 2025, 09:31:48 AM
There is a scaling bug. The second row of the results (Artist) is only half visible. I have windows 125% scaling.
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: Berwhale on February 09, 2025, 02:55:20 PM
I like the look of this, but I can't save any settings for the plug-in.  I'm running MusicBee 3.6.9171. 
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: fiso64 on February 09, 2025, 04:29:48 PM
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
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: aktor on February 09, 2025, 06:49:21 PM
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
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: DanielN on February 09, 2025, 07:54:59 PM
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)
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: aktor on February 10, 2025, 08:31:44 AM
It is laggy on my new laptop.
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: fiso64 on February 10, 2025, 04:10:45 PM
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.
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: fiso64 on February 17, 2025, 09:01:12 PM
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.
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: leftdevices on February 21, 2025, 03:22:12 PM
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?
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: fiso64 on February 23, 2025, 10:39:08 AM
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.
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: usraek on February 25, 2025, 05:57:18 AM
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
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: leftdevices on February 25, 2025, 08:23:14 AM
@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!
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: fiso64 on February 25, 2025, 11:50:24 AM
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.
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: usraek on February 25, 2025, 08:35:48 PM
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.

Whoops, I posted from memory after I changed it 😅

"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.

Thanks for the elaboration!

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.

Ofc, the quantity of configuration permutations for this wonderful program is absolutely absurd. Totally understandable that some things don't jive all the time lol

Cheers mate 😆
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: boroda on March 03, 2025, 04:42:29 PM
very minor issue, but it's worth to fix:

(https://i.imgur.com/bOha89T.png)
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: enrivac on March 10, 2025, 01:33:53 PM
Thanks for the plug-in! Is it possible to change from artist search to album artist?
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: leftdevices on March 11, 2025, 04:02:54 PM
Hah, I just came here to ask for the very same thing @enrivac!
Still really loving this plugin, so nice to use.
Would adding album artwork (and enlarging the thumbnail) be possible, as well?
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: fiso64 on March 13, 2025, 04:30:55 PM
Is it possible to change from artist search to album artist?
Hah, I just came here to ask for the very same thing @enrivac!
Why change from artist to album artist? If it is because some album artists don't have any songs themselves, I can add them to the list of artists as well.
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: leftdevices on March 14, 2025, 10:49:57 AM
For me, a filter (Capital A instead of a?) would work. And/Or a plugin setting for our preference. I'd almost always prefer album artist, but both Artist and Album artist being in the dropdown would be great!
Oh, and the issue is that searching for Artist shows incomplete albums when the song artist is, for instance: 'artist a ft. artist b'.
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: fiso64 on April 20, 2025, 07:38:31 PM
Latest version adds album artists
Title: Re: Modern Search Bar - Unified search bar with fuzzy matching
Post by: fiso64 on May 09, 2025, 08:49:21 PM
1.6 adds command palette (prefix: >) which can be used to search built-in or plugin commands. Check the notes in the updated readme for more info.