add SPOTIFY_HIGH_BITRATE setting to enable streaming of Spotify's high bitrate streams
This commit is contained in:
parent
f307f86620
commit
133a22ef97
@ -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"""
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user