Skip to content

Ignore the information about the release year within the title to capture lyrics#10

Open
HungerHa wants to merge 2 commits intomichaelherger:masterfrom
HungerHa:master
Open

Ignore the information about the release year within the title to capture lyrics#10
HungerHa wants to merge 2 commits intomichaelherger:masterfrom
HungerHa:master

Conversation

@HungerHa
Copy link

This fixes missing lyrics on some German radio stations. #9

$args->{title} =~ s/\[E\]//g;

# remove trailing release year information
$args->{title} =~ s/ \(([0-9]{1,4}(\*+)?|\+NEU\+)\)$//;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

@HungerHa HungerHa Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants