Spotify backend: better error handling.
This commit is contained in:
parent
ab1f9d0cc6
commit
e0b212a275
@ -34,6 +34,9 @@ class SpotifySessionManager(spotify.manager.SpotifySessionManager, BaseThread):
|
||||
|
||||
def logged_in(self, session, error):
|
||||
"""Callback used by pyspotify"""
|
||||
if error:
|
||||
logger.error(u'Spotify login error: %s', error)
|
||||
return
|
||||
logger.info(u'Connected to Spotify')
|
||||
self.session = session
|
||||
if settings.SPOTIFY_HIGH_BITRATE:
|
||||
@ -55,7 +58,7 @@ class SpotifySessionManager(spotify.manager.SpotifySessionManager, BaseThread):
|
||||
|
||||
def connection_error(self, session, error):
|
||||
"""Callback used by pyspotify"""
|
||||
logger.error(u'Connection error: %s', error)
|
||||
logger.error(u'Spotify connection error: %s', error)
|
||||
|
||||
def message_to_user(self, session, message):
|
||||
"""Callback used by pyspotify"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user