Ignore the information about the release year within the title to capture lyrics#10
Ignore the information about the release year within the title to capture lyrics#10HungerHa wants to merge 2 commits intomichaelherger:masterfrom
Conversation
Ignore the information about the release year...
| $args->{title} =~ s/\[E\]//g; | ||
|
|
||
| # remove trailing release year information | ||
| $args->{title} =~ s/ \(([0-9]{1,4}(\*+)?|\+NEU\+)\)$//; |
There was a problem hiding this comment.
This is a very specific regex. What's an example for the \*+? I'm not a fan of adding stuff which look like they're specific to one particular radio station. I wonder whether there should be a user pref to define a custom regex. Otherwise we risk to break working titles.
There was a problem hiding this comment.
You're right that it currently only applies to their radio streams. But I suspect that sooner or later some other stations in the same broadcasting group will have the same questionable idea.
While I was evaluating the regex, 2 other patterns appeared, which I also tried to catch:
The most frequently used pattern (the angle brackets are only for better differentiation of the various parts)
<song title><space>(1994)
More recent titles are unfortunately labeled as such:
<song title><space>(+NEU+)
<song title><space>(2024***)
A user pref for custom regex sounds good and would be a nice option to fix the issue.
This fixes missing lyrics on some German radio stations. #9