]> git.draconx.ca Git - fvwmconf.git/blobdiff - scripts/mpdmenu.pl
mpdmenu: Use a specialized script to send playid commands to MPD.
[fvwmconf.git] / scripts / mpdmenu.pl
index 25a56b30eaa15725d5a1f4952fdd9c0d67856751..ca7d2be3f9603f10dfe23e0c7ffcdcb7591eb96e 100755 (executable)
@@ -104,7 +104,8 @@ if (defined $album) {
                $t_title  = sanitise($t_title, 0);
 
                my $cmd = sprintf "AddToMenu $menu \"%d\t%s - %s\""
-                                 ." Exec mpc playid %d",
+                                 ." Exec exec $FVWM/scripts/mpdexec.pl"
+                                 ." playid %d",
                                  $t_trackno, $t_artist, $t_title, $t_id;
 
                cmd($cmd);
@@ -200,6 +201,9 @@ if (defined $album) {
        s/\s+(instrumental|off vocal|short|tv)([\s-]+(mix|size|version))?$//i;
        s/\s+without\s+\w+$//i;
 
+       # Deal with separate movements in classical pieces.
+       s/: [IVX]+\..*//;
+
        my $basetitle  = $_;
        my $_basetitle = $basetitle;
 
@@ -245,7 +249,9 @@ if (defined $album) {
                $thumb =~ s/\n//sg;
                $thumb = "%$thumb%" if (-f $thumb);
 
-               cmd("AddToMenu $menu \"$thumb$t_artist - $t_title\" Exec mpc playid $t_id");
+               cmd("AddToMenu $menu \"$thumb$t_artist - $t_title\""
+                   ." Exec exec $FVWM/scripts/mpdexec.pl"
+                   ." playid $t_id");
        }
 } # end use locale workaround
 } else {
@@ -295,7 +301,7 @@ if (defined $album) {
 
                if (-f $thumb) {
                        cmd("AddToMenu $menu \"*$thumb*\" "
-                               ."Exec exec gqview ".shellify($scan, 0));
+                               ."Exec exec geeqie ".shellify($scan, 0));
                }
                cmd("AddToMenu $menu \"Title:   ".sanitise($entry{Title}, 0)
                        ."\" Popup MenuMPDTitle");