Skip to content

Commit

Permalink
cleaned the volume +/- code
Browse files Browse the repository at this point in the history
  • Loading branch information
nawar committed Apr 26, 2016
1 parent 760b7d2 commit 846ed09
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions kodi-cli
Original file line number Diff line number Diff line change
Expand Up @@ -169,18 +169,12 @@ done
}

function volume_up {
# Get Active players first
output=`xbmc_req '{"jsonrpc": "2.0", "method": "Player.GetActivePlayers", "id": 99}' true`
player_id=`echo $output | parse_json "playerid"`
echo "Incrementing volume on the player with ID => $player_id"
echo "Incrementing volume"
xbmc_req '{ "jsonrpc": "2.0", "method": "Application.SetVolume", "params": { "volume": "increment" }, "id": 1 }'
}

function volume_down {
# Get Active players first
output=`xbmc_req '{"jsonrpc": "2.0", "method": "Player.GetActivePlayers", "id": 99}' true`
player_id=`echo $output | parse_json "playerid"`
echo "Decrementing volume on the player with ID => $player_id"
echo "Decrementing volume on"
xbmc_req '{ "jsonrpc": "2.0", "method": "Application.SetVolume", "params": { "volume": "decrement" }, "id": 1 }'
}

Expand Down

0 comments on commit 846ed09

Please sign in to comment.