Add bitrate to 'status' response
This commit is contained in:
parent
21b7f9221f
commit
01eb9ac61a
@ -14,6 +14,9 @@ class BaseBackend(object):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
# Status methods
|
# Status methods
|
||||||
|
def status_bitrate(self):
|
||||||
|
return 0
|
||||||
|
|
||||||
def status_consume(self):
|
def status_consume(self):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
@ -194,6 +194,9 @@ class SpotifyBackend(BaseBackend):
|
|||||||
|
|
||||||
# Status methods
|
# Status methods
|
||||||
|
|
||||||
|
def status_bitrate(self):
|
||||||
|
return 320
|
||||||
|
|
||||||
def status_playlist(self):
|
def status_playlist(self):
|
||||||
return self._current_playlist_version
|
return self._current_playlist_version
|
||||||
|
|
||||||
|
|||||||
@ -394,6 +394,7 @@ class MpdHandler(object):
|
|||||||
]
|
]
|
||||||
if self.backend.state in (self.backend.PLAY, self.backend.PAUSE):
|
if self.backend.state in (self.backend.PLAY, self.backend.PAUSE):
|
||||||
result.append(('time', self.backend.status_time()))
|
result.append(('time', self.backend.status_time()))
|
||||||
|
result.append(('bitrate', self.backend.status_bitrate()))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@register(r'^swap (?P<songpos1>\d+) (?P<songpos2>\d+)$')
|
@register(r'^swap (?P<songpos1>\d+) (?P<songpos2>\d+)$')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user