Closed meh closed 12 years ago
Im not to sure about [] - there are quite a few titles like "[untitled]", which are mostly hidden tracks of ripped cds, or are indeed named "untitled". Or "[chali]" from linkin park - I think it would be better to just strip the []s.
Could be done by adding another regex rule:
https://github.com/meh/glyr/blob/c53a18727a4b8319fae2210a0430f3fe1d95c54b/lib/stringlib.c#L116
Im fine with {} or <> - I have none of those although :-) Tell me what you think about this.
They shouldn't be stripped, I didn't know about the regexps.
I'm trying to just add [feat.]
to the regexp list but I'm being retarded and it's not working. What am I doing wrong?
Sorry, don't have the time right now, but I added a test main in stringlib.c and just compile it via:
gcc lib/stringlib.c $(pkg-config --libs --cflags glib-2.0) -std=c99 -lcurl
so you can test easier via ./a.out Hello [feat. World]"
Hi,
Just FYI: I've released libglyr 1.0.0 today. It should be backward compatible, but I fixed some of the misspelled enums (but provided #defines for old code). There is one new interface:
glyr_opt_normalize(GlyrQuery *, GLYR_NORMALIZATION norm)
.. which is there to tell the query how much artist/album/title shall be normalized. With GLYR_NORMALIZE_AGGRESSIVE everything in (), [] and <> is removed. Just in case you want to update ruby-glyr.
Awesome, thank you.
I've got some tracks that use
[]
instead of()
for extra info so I wasn't getting any result, this fixes that and adds some more parenthesis for dumb taggers and/or titles.