Andrew's git
/
scripts.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
fix hyphen bug in music regex
author
Andrew Lorimer
<andrew@lorimer.id.au>
Tue, 11 Jun 2019 06:53:57 +0000
(16:53 +1000)
committer
Andrew Lorimer
<andrew@lorimer.id.au>
Tue, 11 Jun 2019 06:53:57 +0000
(16:53 +1000)
i3blocks-music.pl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
c544174
)
diff --git
a/i3blocks-music.pl
b/i3blocks-music.pl
index 4f71e2b271503b6f123a2b418b6c3a64bac7cb82..97deed4df26bd1da26d436955dd5f1cffc3410d2 100755
(executable)
--- a/
i3blocks-music.pl
+++ b/
i3blocks-music.pl
@@
-28,7
+28,7
@@
push(@metadata, $artist) if $artist;
my $title = qx(playerctl $player_arg metadata title);
$title =~ s/(\s|\s\()[Ff]([et]at[. ].*|t.*)//;
my $title = qx(playerctl $player_arg metadata title);
$title =~ s/(\s|\s\()[Ff]([et]at[. ].*|t.*)//;
-$title =~ s/((\s(\(|\[).+(\)|\]).
+)|(\s-\s.+))+
//;
+$title =~ s/((\s(\(|\[).+(\)|\]).
*)|(\s-\s.+))
//;
push(@metadata, $title) if $title;
for (@metadata){
push(@metadata, $title) if $title;
for (@metadata){