]> git.draconx.ca Git - mpdhacks.git/blobdiff - mpdmenu.pl
thumbnail.sh should be thumbnail.zsh.
[mpdhacks.git] / mpdmenu.pl
index 2b593b0ab9a2a9955b4135836adb11868e1739a6..94ec8d5088ab1fdc9475b4595dbe4bfc7f34a6cf 100755 (executable)
@@ -3,7 +3,7 @@
 use strict;
 
 use Getopt::Long;
-use IO::Socket;
+use IO::Socket::INET6;
 
 use constant {
        MPD_MJR_MIN => 0,
@@ -46,7 +46,7 @@ $artist = decode_utf8($artist) if defined($artist);
 $title  = decode_utf8($title)  if defined($title);;
 
 # Connect to MPD.
-my $sock = new IO::Socket::INET(
+my $sock = new IO::Socket::INET6(
        PeerAddr => $host,
        PeerPort => $port,
        Proto => 'tcp'
@@ -138,11 +138,11 @@ if (defined $album) {
                my $key      = $_;
                my $a_album  = sanitise($key);
 
-               open THUMB, "-|", "$FVWM/scripts/thumbnail.sh",
+               open THUMB, "-|", "$FVWM/scripts/thumbnail.zsh",
                                         "--small", "--music", $albums{$key};
                my $thumb = <THUMB>;
                close THUMB;
-               die("Incompetent use of thumbnail.sh") if ($?);
+               die("Incompetent use of thumbnail.zsh") if ($?);
 
                $thumb =~ s/\n//sg;
                $thumb = "%$thumb%" if (-f $thumb);
@@ -154,7 +154,7 @@ if (defined $album) {
                cmd("DestroyFunc MakeMenuMPDArt_$i");
                cmd("AddToFunc   MakeMenuMPDArt_$i
                     + I DestroyMenu MenuMPDArt_$i
-                    + I -PipeRead \"exec $FVWM/mpdmenu.pl "
+                    + I -PipeRead \"exec $FVWM/scripts/mpdmenu.pl "
                           ."--menu MenuMPDArt_$i "
                           ."--album  ".shellify($key, 1)." "
                           ."--artist ".shellify($artist, 1)."\"");
@@ -234,11 +234,11 @@ if (defined $album) {
                $t_artist = sanitise($t_artist);
                $t_title  = sanitise($t_title);
 
-               open THUMB, "-|", "$FVWM/scripts/thumbnail.sh",
+               open THUMB, "-|", "$FVWM/scripts/thumbnail.zsh",
                                         "--small", "--music", $t_file;
                my $thumb = <THUMB>;
                close(THUMB);
-               die("Incompetent use of thumbnail.sh") if ($?);
+               die("Incompetent use of thumbnail.zsh") if ($?);
 
                $thumb =~ s/\n//sg;
                $thumb = "%$thumb%" if (-f $thumb);
@@ -276,12 +276,12 @@ if (defined $album) {
        }
        die("Failed data query\n") unless (keys(%entry) > 0);
 
-       open THUMB, "-|", "$FVWM/scripts/thumbnail.sh",
+       open THUMB, "-|", "$FVWM/scripts/thumbnail.zsh",
                                 "--image", "--music",  $entry{file};
        my $thumb = <THUMB>;
        my $scan  = <THUMB>;
        close(THUMB);
-       die("Incompetent use of thumbnail.sh") if ($?);
+       die("Incompetent use of thumbnail.zsh") if ($?);
 
        $thumb =~ s/\n//sg;
        $scan  =~ s/\n//sg;
@@ -333,14 +333,14 @@ if (defined $album) {
        cmd("DestroyFunc MakeMenuMPDTitle");
        cmd("AddToFunc   MakeMenuMPDTitle
             + I DestroyMenu MenuMPDTitle
-            + I -PipeRead \"exec $FVWM/mpdmenu.pl "
+            + I -PipeRead \"exec $FVWM/scripts/mpdmenu.pl "
                           ."--menu MenuMPDTitle "
                           ."--title ".shellify($entry{Title}, 1)."\"");
 
        cmd("DestroyFunc MakeMenuMPDAlbum");
        cmd("AddToFunc   MakeMenuMPDAlbum
             + I DestroyMenu MenuMPDAlbum
-            + I -PipeRead \"exec $FVWM/mpdmenu.pl "
+            + I -PipeRead \"exec $FVWM/scripts/mpdmenu.pl "
                           ."--menu MenuMPDAlbum "
                           ."--album  ".shellify($entry{Album}, 1)." "
                           ."--artist ".shellify($entry{Artist}, 1)."\"");
@@ -348,7 +348,7 @@ if (defined $album) {
        cmd("DestroyFunc MakeMenuMPDArtist");
        cmd("AddToFunc   MakeMenuMPDArtist
             + I DestroyMenu MenuMPDArtist
-            + I -PipeRead \"exec $FVWM/mpdmenu.pl "
+            + I -PipeRead \"exec $FVWM/scripts/mpdmenu.pl "
                           ."--menu MenuMPDArtist "
                           ."--artist ".shellify($entry{Artist}, 1)."\"");