mpd: bitrate in status response is always an int

Fixes #577
This commit is contained in:
Stein Magnus Jodal 2013-11-16 02:10:40 +01:00
parent 6323a07629
commit 0c1ce36bfc

View File

@ -214,8 +214,11 @@ def status(context):
def _status_bitrate(futures):
current_tl_track = futures['playback.current_tl_track'].get()
if current_tl_track is not None:
return current_tl_track.track.bitrate
if current_tl_track is None:
return 0
if current_tl_track.track.bitrate is None:
return 0
return current_tl_track.track.bitrate
def _status_consume(futures):