Permalink
Browse files

added return soft_volume in /get_info

  • Loading branch information...
1 parent 931cf3e commit daa8b5caabe07d5b8b5ee64a79b455ecdb41b56b @msoap committed Feb 10, 2013
Showing with 8 additions and 0 deletions.
  1. +4 −0 mojolicious-radio-box.pl
  2. +4 −0 src/cmus-client.pm
View
@@ -329,6 +329,10 @@ sub _cmus_parse_info {
}
}
+ if ($result->{set}->{softvol} && $result->{set}->{vol_left} >= 0 && $result->{set}->{vol_right} >= 0) {
+ $result->{soft_volume} = int(($result->{set}->{vol_left} + $result->{set}->{vol_right}) / 2);
+ }
+
return $result;
}
View
@@ -227,5 +227,9 @@ sub _cmus_parse_info {
}
}
+ if ($result->{set}->{softvol} && $result->{set}->{vol_left} >= 0 && $result->{set}->{vol_right} >= 0) {
+ $result->{soft_volume} = int(($result->{set}->{vol_left} + $result->{set}->{vol_right}) / 2);
+ }
+
return $result;
}

0 comments on commit daa8b5c

Please sign in to comment.