]> git.draconx.ca Git - fvwmconf.git/commitdiff
mpdmenu: remove whitespace at end of lines.
authorNick Bowler <draconx@gmail.com>
Sun, 1 Jun 2008 22:44:00 +0000 (18:44 -0400)
committerNick Bowler <draconx@gmail.com>
Sun, 1 Jun 2008 22:44:00 +0000 (18:44 -0400)
scripts/mpdmenu.pl

index 9b60cdfc70de55d32e4d1ee73573a4e4be9c92e2..4639211c0a62f00b946c4e254dddf2dc60e90a29 100755 (executable)
@@ -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