Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Database Search (Read 223726 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Database Search

Reply #100
Awesome, love the new version...

Thanks again. 

Database Search

Reply #101
Quote
foo_dbsearch 0.11.4

- added hotkeys Shift-Enter (adds all items to the playlist) and Control-Enter (executes "Send to playlist..." with all items). use them in the input box.
- some general commands where moved to foo_utils:
  "Add to playlist", "Insert into playlist", "Send to playlist", "Play"

see this site for download links: http://www.stud.uni-karlsruhe.de/~uzbs/fb2k/html/

great! thanks

Database Search

Reply #102
This plugin's great.  But a feature request: could you add an ability to search for a blank field?  My mp3s are still kind of messy, so a lot of them are missing, say, an album name, or a genre.  It would be really helpful if I could find all those at once.

Other than that, love it.  Thanks!

Database Search

Reply #103
Quote
This plugin's great.  But a feature request: could you add an ability to search for a blank field?  My mp3s are still kind of messy, so a lot of them are missing, say, an album name, or a genre.  It would be really helpful if I could find all those at once.

Other than that, love it.   Thanks!

Actually, what I have been hoping to find somewhere (although probably not from this plugin since it seems outside the scope of what this plugin is about), is the ability to have almost direct database interaction.  So you could, for example, define search strings for multiple fields at the same time.  Or maybe even define your own custom queries.

Database Search

Reply #104
Have you tried Extended Search? (database, exact match)

Database Search

Reply #105
Quote
This plugin's great.  But a feature request: could you add an ability to search for a blank field?  My mp3s are still kind of messy, so a lot of them are missing, say, an album name, or a genre.  It would be really helpful if I could find all those at once.

Other than that, love it.  Thanks!

Well, you can already do that, though you'll have to set up a filter expression in preferences first. As it is now, Extended Search can handle new searching scenarios better, since you don't have to open the preferences.
The instructions for searching tracks with missing album tags with Extended Search are as follows:
1) Set Format to "$if(%album%,,1)" (without the quotes).
2) Choose "boolean" from the dropdown box next to the Pattern field.
3) Set Search What to "Database" .
4) Hit Run.

Database Search

Reply #106
Quote
This plugin's great.  But a feature request: could you add an ability to search for a blank field?  My mp3s are still kind of messy, so a lot of them are missing, say, an album name, or a genre.  It would be really helpful if I could find all those at once.

Other than that, love it.  Thanks!

Search in database, set format to ... whatever, doesn't matter for this one. Set the filter mode to "match all" or "match" one (the dropdown box to the right of the pattern field). Now type "-%artist%" in the pattern field. Result shown: All items in database without an artist tag. Of course, to do this you first have to get:


foo_dbsearch 1.0.0

- removed user-defined filter
- removed search arguments (If you know what that is, don't worry, you won't miss it much.)
- the contents of the pattern field is only remembered when you press enter in this field.
- added various filter modes
- changed the UI a bit

download link: plugin

Unfortunately, there's no updated documention yet, so I'll write something about the filter modes right here:

pass
The simplest mode. All items pass the test.

boolean
The same as in Extended search, only it uses the pattern field, if that is non-empty. If it is empty, it falls back to the format field.

match exact and match prefix
The pattern is matched verbatim against the result of running each item through the format given by the Format field. For "match exact" the two have to be exactly the same (ignoring character case), for "match prefix" the pattern has to be a prefix of the formatted string. In both cases an empty pattern does not match anything.

match all and match one
Probably the most interesting modes. The pattern is split into conditions. A condition is either:
1) a keyword: any string that does not start with one of +, -, ", or % and does not contain spaces.
Example:
Code: [Select]
bla

2) a quoted phrase: a string that starts with " (double quotes); ends at the next " or at the end of the pattern.
Example:
Code: [Select]
"bla bla"

3) a field condition: a string that starts with % (percent sign); ends at the next % or at the end of the pattern.
Example:
Code: [Select]
%field name%


Keywords and quoted phrases match, if their text is contained in the formatted string of an item.
A field condition matches, if a field with the given name exists. A field name starting with __ (two underscores) refers to an info field, any other field name refers to meta field. Special fields can not be matched with this.

A condition can be prefixed with + (plus sign) or - (minus sign) to turn it into a strong condition. Strong conditions must always be met, also in "match one" mode. +A is true, if A is true. -A is true, if A is false.

In "match all" mode, all conditions must be true.
In "match one" mode, all strong conditions must be true, and at least one of the weak conditions, if there is one.

Examples ("match one" mode):
Code: [Select]
a

Code: [Select]
+a

Matches all tracks where a is true.
Code: [Select]
+a b c

Matches all tracks where a is true and at least one of b and c.

Database Search

Reply #107
themes you removed those hotkeys again, why? 

regards; ilikedirt

Database Search

Reply #108
Quote
themes you removed those hotkeys again, why?  

regards; ilikedirt

This is a bug. To be fixed in v1.0.1.

Database Search

Reply #109
foo_dbsearch 1.0.1

- made hotkeys work again
- "match exact" and "match prefix" now work as intended
- changed default filter mode to "match one"

download links:
plugin
mini SDK (for creating your own search domains and filter modes)

Database Search

Reply #110
foo_dbsearch 1.0.2

- fixed behaviour of "match all" and "match one" when there are only strong conditions
- added prefix matching mode for field conditions ("match all" and "match one")

Code: [Select]
%prefix*
%prefix*%

Matches all files that have a meta field whose name starts with prefix. prefix may be the empty string, so "%*" only matches, if there are any meta fields at all.

Code: [Select]
%__prefix*
%__prefix*%

Matches all files that have a info field whose name starts with prefix. prefix may be the empty string, so "%__*" only matches, if there are any info fields at all.

Example:
Code: [Select]
-%__r*

Matches all files that have no info field whose name starts with r. With my set of files, this yields the same results as "-%__replaygain*".

Database Search

Reply #111
Very cool new version.  Couple issues though:

1)  I still can't seem to get shift+enter and ctrl+enter to work (currently using v1.0.2).

2)  The toggle quicklist option in the right-click menu doesn't seem to do anything anymore (I guess its not longer needed).

Database Search

Reply #112
Quote
1)  I still can't seem to get shift+enter and ctrl+enter to work (currently using v1.0.2).

Catching presses of the enter key (and where they come from) is trickier than it seems. It worked for me and for ssamadhi97, who tested this feature on WinXP.

Quote
2)  The toggle quicklist option in the right-click menu doesn't seem to do anything anymore (I guess its not longer needed).

I forgot to remove that.

Database Search

Reply #113
Quote
1)  I still can't seem to get shift+enter and ctrl+enter to work (currently using v1.0.2).

Did you try Shift+Enter and Control+Enter from the resultlist? Well, those hotkeys are only supposed to work from either the pattern field or one of the two dropdown listboxes. Was that your problem?

Database Search

Reply #114
Quote
Quote
1)  I still can't seem to get shift+enter and ctrl+enter to work (currently using v1.0.2).

Did you try Shift+Enter and Control+Enter from the resultlist? Well, those hotkeys are only supposed to work from either the pattern field or one of the two dropdown listboxes. Was that your problem?

Ahh, yea, I'm a dumbass.  I must have been trying it while some other object was focused (still within the search window though, I'm not that stupid). 

Thanks for the insight...

Database Search

Reply #115
Quote
Ahh, yea, I'm a dumbass.  I must have been trying it while some other object was focused (still within the search window though, I'm not that stupid). 

Thanks for the insight...

I didn't think of that immediately, and the thought that the current implementation would not work on every system was ... frustrating.
I'd better make those hotkeys work in the entire dialog for all those dumbasses out there (including me). At least until this plugin - some day - has fully configurable hotkeys (that one's on my personal wishlist).

edit: Aaah, I can't spill!

Database Search

Reply #116
I have 1.0.2 and I noticed that the 'play' as default action was removed  Thats the only reason I would search, because I leave all of my music in the playlist...and then search and play. As requested somewhere earlier in the thread, just to be able to have it move the cursor to the file would be nice...and what about being able to hit enter, instead of having to double click? Those three implementations would make my life complete

Database Search

Reply #117
Quote
I have 1.0.2 and I noticed that the 'play' as default action was removed  Thats the only reason I would search, because I leave all of my music in the playlist...and then search and play.

As said above, the "Play" command (and some other general commands as well) have been moved into a separate plugin. Install that, too, and you can use "Play" again.
Quote
As requested somewhere earlier in the thread, just to be able to have it move the cursor to the file would be nice...and what about being able to hit enter, instead of having to double click? Those three implementations would make my life complete

Hitting enter does not work for you? Please make sure that a default action is configured in preferences.

Database Search

Reply #118
Is there a %var% that will include the full path or at least the directory name that the file is in?  Currently I use %_filename% to search for songs that either don't have any tags or they are incorrect.  It would be nice to be able to search in the directory name as well since it often contains the name of the album that the songs are in.  Would it be possible to add a formatlist entry that would search in either the filename or the full path?

Database Search

Reply #119
Ok, nevermind.  %_path% works great.  I guess I should search around before I start asking questions....

Database Search

Reply #120
Quote
As said above, the "Play" command (and some other general commands as well) have been moved into a separate plugin. Install that, too, and you can use "Play" again.

Hitting enter does not work for you? Please make sure that a default action is configured in preferences.

Thank you so much, Im sorry I didnt read the thread carefully enough, and I love it now.

However, in reguards to pressing enter, it seems that when I type something into the search box, the focus is not on the window with the results. The most matched item is at the top of the list, and boxed in red, however, to get enter to work, I guess I have to focus the box, by clicking it once, where the background turns blue, and then I can hit enter...

(By the way, thank you for the quick replies )

Database Search

Reply #121
Quote
However, in reguards to pressing enter, it seems that when I type something into the search box, the focus is not on the window with the results. The most matched item is at the top of the list, and boxed in red, however, to get enter to work, I guess I have to focus the box, by clicking it once, where the background turns blue, and then I can hit enter...

(By the way, thank you for the quick replies )

Pressing enter in the result list has a different meaning than pressing it in one of the other fields.

Result list:
- Enter: Run configured default action on selected items.

Other fields:
- Enter: Force results to be refreshed (useful if you disabled auto-refresh in prefs). Pattern is remembered.
- Shift+Enter: Add all results to playlist. [also works in result list in upcoming version]
- Control+Enter: Run "Send to playlist..." on all results. [also works in result list in upcoming version]

Perhaps I should take some time to update the readme.

Database Search

Reply #122
Quote
Pressing enter in the result list has a different meaning than pressing it in one of the other fields.

Result list:
- Enter: Run configured default action on selected items.

Other fields:
- Enter: Force results to be refreshed (useful if you disabled auto-refresh in prefs). Pattern is remembered.
- Shift+Enter: Add all results to playlist. [also works in result list in upcoming version]
- Control+Enter: Run "Send to playlist..." on all results. [also works in result list in upcoming version]

Im sorry Im being a pain...

I figured as much, about 'enter' having different functions depending on what was in focus, but the whole reason I use search is because I can bring foobar into focus, press the hotkey for search, type something in, and hit enter, and it doesnt the function...however, with the way things are setup, I have to click the resultlist box and hit enter, or double click, and I know it sounds like nagging over the tiniest amount of extra work, but my hands can move from keys to the enter key a million times faster than they can to the mouse, and then to click. I dont know C/C++ (Which is what Im guessing these plugins use, I did look at the mini-sdk)...otherwise I would make an attempt so that from the search field, I could have it  do the resultlist action by pressing enter...but I cant. Is there anyway you could make this configurable or something in the next version? Like have a dropdown box for each field, and be able to choose like "From resultlists, enter does this" and "From search field, enter does this"...I know that might be alot of work, but Id really appreciate it...Is there any other way I could set it up? Or any chance you want to release me a special version  just kidding...Anyway, any replies to this would be nice, even if its "no, no, and...no...  "...Thanks

Database Search

Reply #123
Quote
Im sorry Im being a pain...

I figured as much, about 'enter' having different functions depending on what was in focus, but the whole reason I use search is because I can bring foobar into focus, press the hotkey for search, type something in, and hit enter, and it doesnt the function...however, with the way things are setup, I have to click the resultlist box and hit enter, or double click, and I know it sounds like nagging over the tiniest amount of extra work, but my hands can move from keys to the enter key a million times faster than they can to the mouse, and then to click. I dont know C/C++ (Which is what Im guessing these plugins use, I did look at the mini-sdk)...otherwise I would make an attempt so that from the search field, I could have it  do the resultlist action by pressing enter...but I cant. Is there anyway you could make this configurable or something in the next version? Like have a dropdown box for each field, and be able to choose like "From resultlists, enter does this" and "From search field, enter does this"...I know that might be alot of work, but Id really appreciate it...Is there any other way I could set it up? Or any chance you want to release me a special version  just kidding...Anyway, any replies to this would be nice, even if its "no, no, and...no...  "...Thanks

Code: [Select]
if (is_feature_request) while (true) printf("no.\n");

There's currently no way to set it up the way you want (neither through prefs nor the mini sdk), but as I mentioned some posts ago, I'd like to include fully configurable hotkeys some time. So unless you want to write the hotkey configuration for me, you'll have to wait patiently.

If you don't want to use the mouse, you can try the tab key (for switching to the resultlist); selecting items in the resultlist works very much like selecting them in the playlist. I know that that's more than one key press, but hey...

Database Search

Reply #124
Would it be possible to add a 'Winamp' style search checkbox, where when you hit enter, it automatically jumps to the song at the top of the list and closes the search box, without having to click on the song and then close the box?  That's the one small niggle I have with this plugin, otherwise it's great!  It would just be nice to subtract a fwe keystrokes from to search for something.  Thanks  ,

BO(V)BZ