quodlibet / quodlibet

Music player and music library manager for Linux, Windows, and macOS
https://quodlibet.readthedocs.io
GNU General Public License v2.0
1.45k stars 224 forks source link

performer:role tag searching - search for presence of particular performer:role tag #2985

Open davidSchlosser opened 6 years ago

davidSchlosser commented 6 years ago

I have performer:role tags where the roles might contain punctuation or spaces, for example: "performer:tenor, soprano saxophone"

A search string "performer:tenor, soprano saxophone=/[a-z]/" (without quotes) in the search bar gives mismatches including those with tags "performer:tenor", etc.

What pattern allows me to search only for tracks with tags whose name exactly matches "performer:tenor, alto saxophone"?

zsau commented 6 years ago

Out of curiosity, why would you use a single performer:tenor, soprano saxophone tag rather than two separate tags performer:tenor saxophone and performer:soprano saxophone? QL has no concept of compound roles, so for example a search for performer:tenor saxophone=... wouldn't match your tag.

As for searching, I'm not sure it's currently possible since the regex for a tag is /[~\w\s:]+/, (word characters, whitespace, tilde and colon), and there doesn't seem to be a way to escape other characters. I'm not even sure what the ideal syntax for this kind of search would be.

davidSchlosser commented 6 years ago

Fair question. I wanted the search so I can clean up songs with these problematic tags, of which I have many. I also came to the conclusion that it probably isn't possible in QL so I'm now looking at using a Python script to split them.