my $what = $f[1];
if ($what eq "state") {
my $st = $f[2];
- 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";
+ my $msg;
+ 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"; }
+ else { next LINE; }
+ notify "DisOrder state", ucfirst $msg;
}
} elsif ($what eq "playing") {
now_playing $f[2];