Add bitrate to 'status' response

This commit is contained in:
Stein Magnus Jodal 2009-12-26 05:26:42 +01:00
parent 21b7f9221f
commit 01eb9ac61a
3 changed files with 7 additions and 0 deletions

View File

@ -14,6 +14,9 @@ class BaseBackend(object):
return None
# Status methods
def status_bitrate(self):
return 0
def status_consume(self):
return 0

View File

@ -194,6 +194,9 @@ class SpotifyBackend(BaseBackend):
# Status methods
def status_bitrate(self):
return 320
def status_playlist(self):
return self._current_playlist_version

View File

@ -394,6 +394,7 @@ class MpdHandler(object):
]
if self.backend.state in (self.backend.PLAY, self.backend.PAUSE):
result.append(('time', self.backend.status_time()))
result.append(('bitrate', self.backend.status_bitrate()))
return result
@register(r'^swap (?P<songpos1>\d+) (?P<songpos2>\d+)$')