improve title shortening regex
authorAndrew Lorimer <andrew@lorimer.id.au>
Thu, 28 Jun 2018 07:51:39 +0000 (17:51 +1000)
committerAndrew Lorimer <andrew@lorimer.id.au>
Thu, 28 Jun 2018 07:51:39 +0000 (17:51 +1000)
i3blocks-music.pl
index 9bee37a5e2ae3deb956e30041f705dd8cc16f900..4d6ab2734744e8e9261967a8af70783adddb78c1 100755 (executable)
@@ -27,7 +27,7 @@ my $artist = qx(playerctl $player_arg metadata artist);
 push(@metadata, $artist) if $artist;
 
 my $title = qx(playerctl $player_arg metadata title);
-$title =~ s/(?:[ ][( ][Ff]eat[. ].*)|(?:[( ][Ff]t[. ].*)//;
+$title =~ s/(\s|\s\()[Ff]([et]at[. ].*|t.*//;
 push(@metadata, $title) if $title;
 
 # Print stuff