From 5def4ff4970eacb03be862d0b30f5e859313e6f4 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Sun, 1 Jun 2008 18:44:00 -0400 Subject: [PATCH] mpdmenu: remove whitespace at end of lines. --- mpdmenu.pl | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/mpdmenu.pl b/mpdmenu.pl index d4120f6..ffe2f92 100755 --- a/mpdmenu.pl +++ b/mpdmenu.pl @@ -67,27 +67,27 @@ if (defined $album) { my $entry; $menu = "MenuMPDAlbum" unless defined $menu; - + $album =~ s/"/\\"/g; print $sock "playlistfind album \"$album\"\n"; while (<$sock>) { last if (/^OK/); die($_) if (/^ACK/); - + if (/^(\w+): (.*)$/) { if ($1 eq "file") { if (keys(%$entry) > 0) { addalbumentry(\@playlist, $entry) } - + $entry = {}; } - + $entry->{$1} = $2; } } addalbumentry(\@playlist, $entry) if (keys(%$entry) > 0); - + die("No tracks found.\n") if (!@playlist); foreach (sort albumsort @playlist) { my ($t_file, $t_trackno, $t_artist, $t_title, $t_id) = ( @@ -97,16 +97,16 @@ if (defined $album) { $_->{Title}, $_->{Id}, ); - + next if (defined $artist && !$accept{albumdir($t_file)}); - + $t_artist = sanitise($t_artist); $t_title = sanitise($t_title); - + my $cmd = sprintf "AddToMenu $menu \"%d\t%s - %s\"" ." Exec mpc playid %d", $t_trackno, $t_artist, $t_title, $t_id; - + cmd($cmd); } } elsif (defined $artist) { @@ -122,7 +122,7 @@ if (defined $album) { while (<$sock>) { last if (/^OK/); die($_) if (/^ACK/); - + if (/^(\w+): (.*)$/) { $file = $2 if ($1 eq "file"); $albums{$2} = $file if ($1 eq "Album"); @@ -207,13 +207,13 @@ if (defined $album) { while (<$sock>) { last if (/^OK/); die($_) if (/^ACK/); - + if (/^(\w+): (.*)$/) { if ($1 eq "file") { push @titles, $entry if (keys(%$entry) > 0); $entry = {}; } - + $entry->{$1} = $2; } } @@ -350,7 +350,7 @@ if (defined $album) { ."--menu MenuMPDAlbum " ."--album ".shellify($entry{Album}, 1)." " ."--artist ".shellify($entry{Artist}, 1)."\""); - + cmd("DestroyFunc MakeMenuMPDArtist"); cmd("AddToFunc MakeMenuMPDArtist + I DestroyMenu MenuMPDArtist -- 2.43.0