use strict;
use Getopt::Long;
-use IO::Socket;
+use IO::Socket::INET6;
use constant {
MPD_MJR_MIN => 0,
$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'
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);
s/ -Practice Track-//; # Fair Heaven
s/〜世界で一番アナタが好き〜//; # Pure Heart
s/〜彼方への哀歌//; # 十二幻夢
+ s/ sora no uta ver.//; # 美しい星
s/\s*-remix-$//; # Otherwise "D-THREAD -remix-" doesn't work right.
s/\s*$ob.*(style|mix|edit|edition|ver\.?|version|カラオケ)$cb?$//i;
# Deal with titles like "blah (without XYZ)".
- s/\s*$ob((e\.)?piano|english|japanese|inst|tv|without|w\/o|off|back|short|karaoke|game).*//i;
+ s/\s*$ob\s*((e\.)?piano|english|japanese|inst|tv|without|w\/o|off|back|short|karaoke|game).*//i;
# Deal with titles like "blah instrumental".
- s/\s+(instrumental|off vocal|short)(\s+(size|version|s))?$//i;
+ s/\s+(instrumental|off vocal|short|tv)([\s-]+(mix|size|version))?$//i;
s/\s+without\s+\w+$//i;
my $basetitle = $_;
);
# MPD searches are case-insensitive.
- next if (!($t_title =~ m/(\P{Latin}|^)\Q$basetitle\E(\P{Latin}|$)/));
+ next if (!($t_title =~ m/(\P{Latin}|^)\Q$basetitle\E(\P{Latin}|$)/ || $t_title =~ m/\Q$basetitle\E/i));
+
$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);
}
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>;