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: foo_quicksearch (Read 239849 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: foo_quicksearch

Reply #450
Hi NEMO:
Thank you for creating the 64.bit version. I used it for a long time on my old 32.bit version.
I installed it and noticed that a bug that the 32.bit version already had is still present in the 64.bit version. It would be very favorable for me if it could be corrected.
It is that when applying to a button the Quicksearch for same/Album property it does not find the album if in the %album% metadata there is any double quotation mark.
Yeah the search query builder doesn't seem to like double quotes at all. I'll try to figure out a good way to fix this.
I don't have a good way to fix this. The query syntax doesn't have any sane way to handle literal double quotation marks.
Might have to remove the quotes from the album/artist/etc search string and use something like $replace(%album%,$char(34),) and then search. Some threads for me to reread when I come back to this:
https://hydrogenaud.io/index.php/topic,117853.0.html
https://hydrogenaud.io/index.php/topic,114987.0.html

Is the plugin incompatibility due to QuickSearch or MultiLyrics? I am leaning toward QuickSearch since the incompatibility didn't pop up until QS was updated.
I was assuming and hoping it was a problem the multisource thing so while I was working on some other things I was hoping the other dev was going to look into it xd. I'm currently checking in a debugger to see what's going on.
An uninitialized handle was being destroyed which somehow only became an issue when loaded together with multisource. Very interesting.

I'll send a message to nemo for a new release with the crash fix.

Re: foo_quicksearch

Reply #451
Might have to remove the quotes from the album/artist/etc search string and use something like $replace(%album%,$char(34),) and then search.

I've tried this just now. It works well enough.

Re: foo_quicksearch

Reply #452
Hello,
Thanks to  rtldg the conflict with with foo_multisource has been fixed.
It can be downloaded from the usual location : foobar components repository which now contains 32 bits and 64 bits version.

Re: foo_quicksearch

Reply #453
Hi NEMO:
Thank you for creating the 64.bit version. I used it for a long time on my old 32.bit version.
I installed it and noticed that a bug that the 32.bit version already had is still present in the 64.bit version. It would be very favorable for me if it could be corrected.
It is that when applying to a button the Quicksearch for same/Album property it does not find the album if in the %album% metadata there is any double quotation mark.
Yeah the search query builder doesn't seem to like double quotes at all. I'll try to figure out a good way to fix this.

Thanks rtldg.
I hope you manage to solve the problem with the double quotes.

I have the problem in addition to the %album% in the %title%.

I used Quick Search on my 32-bit version and always had this problem.
When I switched to the 64-bit version I had to use the Qsearch component of Marc2k3 which was much more limited since you could not program the searches and it is no longer supported. But searching by %album% or %title% worked fine even if they had double quotes.

Re: foo_quicksearch

Reply #454
When I switched to the 64-bit version I had to use the Qsearch component of Marc2k3 which was much more limited since you could not program the searches and it is no longer supported. But searching by %album% or %title% worked fine even if they had double quotes.

I don't think that's right at all. Using IS did not work at all and using HAS only worked some of the time depending on where the double quotes were, It could not be relied upon.

I did update my own component with workarounds using $stricmp/$strstr but that was only in the last day after reading this thread..

Re: foo_quicksearch

Reply #455
For reference the SMP version of Quicksearch managed that since its inception cleaning the input values like this:
Code: [Select]
"$puts(title,$ascii($lower($trim($replace(%TITLE%,\'\',,`,,’,,´,,-,,\\,,/,,:,,$char(34),)))))$stricmp($get(title),########)" IS 1
Where '########' is the actual title value of the selection applying the $ascii(...) logic too. That way it works with any exotic chars, if the quotes use different chars, there are no quotes, etc.

The SMP version also handles parentheses and variations like (instrumental), (live), while skipping things like (part 1), ... with regexp.

For the plugin this could be used as tag value to achieve a similar result:
Code: [Select]
$ascii($lower($trim($replace(%TITLE%,\'\',,`,,’,,´,,-,,\\,,/,,:,,$char(34),))))

$char(34) is ".

 

Re: foo_quicksearch

Reply #456
That post above did remind me that I totally forgot about special chars used in title formatting. That means $%()[],' all need to be escaped in the search term. Back to the drawing board... :P

edit: my QSearch component has been updated

Re: foo_quicksearch

Reply #457
That post above did remind me that I totally forgot about special chars used in titl;e formatting. That means $%()[],' all need to be escaped in the search term. Back to the drawing board... :P

Yep xd it's easier to do it in JS with a standard cleanup/escape function. But with the example above people get the idea to make it work with any char in TF.

Re: foo_quicksearch

Reply #458
That post above did remind me that I totally forgot about special chars used in title formatting. That means $%()[],' all need to be escaped in the search term. Back to the drawing board... :P

edit: my QSearch component has been updated

I have installed version 1.0.10 of qsearch and tested if it works in case the metadata contains double quotes.

Album IS option does work

Title HAS option does not work

Example:
%title% = Crazy "He Calls"

Title HAS "$strstr($replace(%title%,$char(34),),crazy he calls)" PRESENT -> DOES NOT WORK
                 
                 I replaced the script with this one:
                "$stricmp($replace($replace(%title%,$char(34),),crazy he calls)" PRESENT -> YES IT WORKS

If you consider it appropriate I would appreciate if you update the component.

Re: foo_quicksearch

Reply #459
Of course the first one doesn't work. There's no way in a billion years my component would prepend $stricmp/$strstr with Title HAS. That would be insane. Did you pull that out of your rectum? :/

FWIW, I tested with this as the title.

Code: [Select]
🤪 $argh([test])"o'h n,o%es""

See attachment...

edit: actual queries:

IS
Code: [Select]
"$stricmp($replace(%title%,$char(34),),🤪 '$'argh'(''['test']'')'o''h n','o'%'es)" PRESENT

HAS
Code: [Select]
"$strstr($replace(%title%,$char(34),),🤪 '$'argh'(''['test']'')'o''h n','o'%'es)" PRESENT

Re: foo_quicksearch

Reply #460
I'd like to apologise about my off topic ramblings above.

I do have a comment to make about foo_quicksearch though.

When you do a quicksearch for same..., a playlist is created with a lock. Nothing wrong with that in principle but with my amateur developer hat on, it does not do it properly...

Code: [Select]
auto api = playlist_manager::get();
const size_t pl = api->get_active_playlist();
const bool locked = api->playlist_lock_is_present(pl);
// true as expected
const uint32_t mask = api->playlist_lock_get_filter_mask(pl);
// always zero which is the bug

It seems the lock does prevent renaming so the mask needs to reflect that.


Re: foo_quicksearch

Reply #461
Message to NEMO:

I would like to be able to make Quick Search Toolbar modifiable in height.

Through Layout it is not possible because the handles do not open.

The only way I have found is to modify the font in colours & fonts / common (list items). But as it is an option used by Re-Facets and other components it modifies the font size of them.

I would like, if possible, that the component configuration itself allows to change the font, or in colours & fonts create an item to change the Quick Search font.


Re: foo_quicksearch

Reply #462
Hi
may I ask a question?
I would like to add a field (or more) like  %myrating% (favorite album) or %mood% (sad)
could quicksearch find them ?
just because i have added this field <myrating> favorite and <mood>  sad , and quicksearch can't find them
maybe it's my fault
thanks for the plugin

Re: foo_quicksearch

Reply #463
@francesco
Have you added these %myrating% and %mood% tags to quick search itself through Prefrences?

As an example, in the below graphic I've added the %comment% tag to quick search:

X


And are the tags you have added to quicksearch listed here:

X



Re: foo_quicksearch

Reply #464
@francesco
Have you added these %myrating% and %mood% tags to quick search itself through Prefrences?

As an example, in the below graphic I've added the %comment% tag to quick search:

And are the tags you have added to quicksearch listed here:

hi
yes i did it , i have added %myrating% even in foobar2000 propierties does show <myrating>
have you tried a custom field like favorite or different tag fields ?
does quicksearch find them in case you have tried ?
thanks


Re: foo_quicksearch

Reply #466
@francesco
For the heck of it I put a new field named "mood" in a random audio file, and I gave that audio file's mood tag the value of easy.


X





And through preferences I added the mood tag to quick search.


X


Doing a search, with quick search, of "mood" tags with the term "easy". I got the result of the audio file I had put the mood tag in.


X


Not shown in the above graphic is that I searched in "All Playlists".


Re: foo_quicksearch

Reply #467
@francesco
For the heck of it I put a new field named "mood" in a random audio file, and I gave that audio file's mood tag the value of easy.

And through preferences I added the mood tag to quick search.

Doing a search, with quick search, of "mood" tags with the term "easy". I got the result of the audio file I had put the mood tag in.

Not shown in the above graphic is that I searched in "All Playlists".
hi @cwb
i have appreciate your screenshots
now it works , i think i did some mistakes with the %% and <>
but can only foorbar2000 read these tags ? I mean not other players like musicbee
thank you so much