- if ($st eq "disable_random") {
- notify "DisOrder state", "Random play disabled";
- } elsif ($st eq "enable_random") {
- notify "DisOrder state", "Random play enabled";
- } elsif ($st eq "disable_play") {
- notify "DisOrder state", "Playing disabled";
- } elsif ($st eq "enable_play") {
- notify "DisOrder state", "Playing enabled";
- } elsif ($st eq "pause") {
- notify "DisOrder state", "Paused";
- } elsif ($st eq "resume") {
- notify "DisOrder state", "Resuming";
- }
- } elsif ($what eq playing) {
- my $track = $f[2];
- my %p;
- for my $p ("artist", "album", "title") {
- open my $f, "-|", "disorder", "part", $track, "display", $p;
- chomp ($p{$p} = <$f>);
- close $f;
+ my $msg;
+ my $np = 0;
+ if ($st eq "disable_random") { $msg = "random play disabled"; }
+ elsif ($st eq "enable_random") { $msg = "random play enabled"; }
+ elsif ($st eq "disable_play") { $msg = "playing disabled"; }
+ elsif ($st eq "enable_play") { $msg = "playing enabled"; }
+ elsif ($st eq "pause") { $msg = "paused"; }
+ elsif ($st eq "resume") { $msg = "playing"; $np = 1; }
+ else { next LINE; }
+ if (!$startp) {
+ notify "DisOrder state", ucfirst $msg;
+ now_playing if $np;
+ } else {
+ if (defined $startinfo) { $startinfo .= "; " . $msg; }
+ else { $startinfo = $msg; }