Skip to content

Commit

Permalink
Fix bug where volume couldn't be set to 0 through the web interface/api
Browse files Browse the repository at this point in the history
  • Loading branch information
Fornoth committed Mar 31, 2016
1 parent 16d8a89 commit ec0638c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ def playback_volume():

@app.route('/api/playback/volume', methods=['POST'], endpoint='playback_volume-post')
def playback_volume():
volume = int(request.form.get('value'))
if not volume:
volume = request.form.get('value')
if volume is None:
return jsonify({
'error': 'value must be set'
}), 400
lib.SpPlaybackUpdateVolume(volume)
lib.SpPlaybackUpdateVolume(int(volume))
return '', 204

#Info routes
Expand Down

0 comments on commit ec0638c

Please sign in to comment.