X-Git-Url: https://git.draconx.ca/gitweb/mpdhacks.git/blobdiff_plain/d9b445c9f21cba5539cdc2f1103ca686a71e8a29..f955e376aa421d6e1c169addf66e120d29415faa:/mpdmenu.pl diff --git a/mpdmenu.pl b/mpdmenu.pl index 2b593b0..7a48c20 100755 --- a/mpdmenu.pl +++ b/mpdmenu.pl @@ -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' @@ -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)."\""); @@ -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)."\"");