From 568abc896cc9b4fac8e4d3da0859b3b8182409f0 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Tue, 20 Sep 2022 12:45:45 +0200 Subject: 10-azlyrics.pl: fix "the" stripping --- info/10-azlyrics.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'info') diff --git a/info/10-azlyrics.pl b/info/10-azlyrics.pl index 4b88bda..3cc0b92 100755 --- a/info/10-azlyrics.pl +++ b/info/10-azlyrics.pl @@ -20,8 +20,8 @@ my ($title, $artist, $album) = map {decode_utf8($_)} @ARGV; # TODO: An upgrade would be transliteration with, e.g., Text::Unidecode. use Unicode::Normalize; -$artist = lc(NFD($artist) =~ s/^the\s+//ir =~ s/[^A-Za-z0-9]//gr); -$title = lc(NFD($title) =~ s/\(.*?\)//gr =~ s/[^A-Za-z0-9]//gr); +$artist = lc(NFD($artist)) =~ s/^the\s+//ir =~ s/[^a-z0-9]//gr; +$title = lc(NFD($title)) =~ s/\(.*?\)//gr =~ s/[^a-z0-9]//gr; # TODO: Consider caching the results in a location like # $XDG_CACHE_HOME/nncmpp/info/azlyrics/$artist-$title -- cgit v1.2.3-70-g09d2