]> git.draconx.ca Git - fvwmconf.git/blobdiff - scripts/mpdmenu.pl
mpdmenu: Update title menu cases.
[fvwmconf.git] / scripts / mpdmenu.pl
index ebd4c319a3883ffe8eb9c024e5ad4ee4aebeeed1..d2c4c2cc8584876ce096e972fcf85dc46fc67108 100755 (executable)
@@ -186,6 +186,7 @@ if (defined $album) {
        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.
 
@@ -193,10 +194,10 @@ if (defined $album) {
        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  = $_;
@@ -230,7 +231,8 @@ if (defined $album) {
                );
 
                # 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);