From: bw1 Date: Fri, 22 Feb 2019 11:10:58 +0000 (+0100) Subject: [listen] bug fix X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=d173b791e932441e988deb2a1b906dcee604ee50;p=irssi-scripts.irssi.org.git [listen] bug fix --- diff --git a/scripts/listen.pl b/scripts/listen.pl index 9fd13ab..0a07a46 100644 --- a/scripts/listen.pl +++ b/scripts/listen.pl @@ -3,14 +3,14 @@ use Irssi; use Irssi::Irc; use vars qw($VERSION %IRSSI); -$VERSION = "0.2"; +$VERSION = "0.3"; %IRSSI = ( authors => "Csaba Nagy", contact => "lordpyre\@negerno.hu", name => "listen", description => "A simple mp3 display script that will display what mp3 you are playing in which software (mpg123, xmms, mp3blaster, etc) to your active channel or to a query window.", license => "GNU GPLv2 or later", - changed => "Tue Nov 26 19:55:04 CET 2002" + changed => "2019-02-22" ); # Usage: 1, load the script @@ -73,7 +73,8 @@ sub getmp3filename { # if we have found one player 'turned on', we don't have to # check the other results of lsof, so we can leave if ($mp3player ne "nope") { - $mp3file=$line[$#line]; + $_ =~ m#(/.*)$#; + $mp3file=$1; last GECMO; } } @@ -107,7 +108,7 @@ sub getmp3proces { sub getmp3idtags { # getting the idtags from file - open(ID3GECMO, "-|", "id3 -R -l \"$mp3file\""); + open(ID3GECMO, '-|', 'id3', '-R', $mp3file); while () { chop; foreach my $kulcs (keys %idtag) {