foo_openlyrics icon indicating copy to clipboard operation
foo_openlyrics copied to clipboard

Exclude text in brackets option in "Searching" Settings

Open ngs428 opened this issue 8 months ago • 5 comments

I have this box checked, what is the expected result?

When I click on a file and do a "Search for lyrics (manually)" the album name that appears at the top of the "Search for lyrics" window still has the text in brackets shown. Should this not be shown, I assume not.

Also does brackets refer to parentheses or just [ ]?

thanks!

ngs428 avatar Apr 20 '25 22:04 ngs428

Also does brackets refer to parentheses or just [ ]?

Both, it refers to parenthesis (()), brackets ([]) and braces ({}).

I have this box checked, what is the expected result?

The trailing text in brackets will be excluded from the query sent to the sources being searched.

I suppose there is an argument to be made either way about whether this should be applied when populating the manual search text boxes (in which case they'd be visibly removed) or when doing the actual query (in which case they'd be silently removed).

jacquesh avatar Apr 21 '25 08:04 jacquesh

I was hoping it would refer to all 3, so that is good. The user should receive the visual feedback (text removed in the query field) to verify it is removed. ESLyric has a similar feature and text is removed.

I don't think the setting is actually working though. I get the exact same results with the box checked or not and when I manually remove the bracketed text I get the results I expect to see. All below are sorted to have timestamped first.

When I leave the box checked, I get these results: Image

When I uncheck the option box: Image

When I manually remove the text in parentheses: Image

ngs428 avatar Apr 21 '25 11:04 ngs428

Ah, took another quick look over the code. I suspect it just only works for the autosearch and doesn't apply to manual search. This would make sense because the whole point of manual search is to give the user full control and minimise automated processes that happen behind the scenes.

It definitely does work for the autosearch though.

Maybe we just update the label on the preference to explicitly call out that it applies only to the auto-search?

jacquesh avatar Apr 21 '25 17:04 jacquesh

Yes, updating the label to state auto-search only and also say what it looks for…. it refers to parenthesis (()), brackets ([]) and braces ({}).

Personally, I’d like to see a 2nd check box to be able to apply this to manual searches, rather than having to manually delete the text each time.

ngs428 avatar Apr 21 '25 17:04 ngs428

An even better option would be to support Foobar2000's title formatting syntax to modify the fields. The convenience of having a simple checkbox to remove text in brackets is nice, but I want to support (), [], {}, maybe «» etc.

[Edit]

Oh, it's been suggested in #325 (Configurable Artist and Title remapping).

Athari avatar Apr 28 '25 19:04 Athari