add SPOTIFY_HIGH_BITRATE setting to enable streaming of Spotify's high bitrate streams

This commit is contained in:
Johannes Knutsen 2010-11-23 00:26:23 +01:00
parent f307f86620
commit 133a22ef97
2 changed files with 11 additions and 0 deletions

View File

@ -36,6 +36,12 @@ class LibspotifySessionManager(SpotifySessionManager, BaseThread):
logger.info(u'Connected to Spotify')
self.session = session
self.connected.set()
if settings.SPOTIFY_HIGH_BITRATE:
logger.debug(u'Prefer high bitrate')
self.session.set_preferred_bitrate(1)
else:
logger.debug(u'Prefer normal bitrate')
self.session.set_preferred_bitrate(0)
def logged_out(self, session):
"""Callback used by pyspotify"""

View File

@ -183,3 +183,8 @@ SPOTIFY_USERNAME = u''
#:
#: Used by :mod:`mopidy.backends.libspotify`.
SPOTIFY_PASSWORD = u''
#: Do you prefer high bitrate (320k)?
#:
#: Used by :mod:`mopidy.backends.libspotify`.
SPOTIFY_HIGH_BITRATE = False