def logged_in(sp_session, sp_error): if not spotify.session_instance: return if sp_error == spotify.ErrorType.OK: logger.info('Logged in') else: logger.error('Login error: %s', spotify.ErrorType(sp_error)) spotify.session_instance.emit(SessionEvent.LOGGED_IN, spotify.session_instance, spotify.ErrorType(sp_error))
def error(self): """An :class:`ErrorType` associated with the album browser. Check to see if there was problems creating the album browser. """ return spotify.ErrorType(lib.sp_albumbrowse_error( self._sp_albumbrowse))
def connection_error(sp_session, sp_error): if not spotify._session_instance: return error_type = spotify.ErrorType(sp_error) logger.error('Spotify connection error: %r', error_type) spotify._session_instance.emit(SessionEvent.CONNECTION_ERROR, spotify._session_instance, error_type)
def scrobble_error(sp_session, sp_error): if not spotify._session_instance: return error_type = spotify.ErrorType(sp_error) logger.error('Spotify scrobble error: %r', error_type) spotify._session_instance.emit(SessionEvent.SCROBBLE_ERROR, spotify._session_instance, error_type)
def streaming_error(sp_session, sp_error): if not spotify._session_instance: return error_type = spotify.ErrorType(sp_error) logger.error('Spotify streaming error: %r', error_type) spotify._session_instance.emit(SessionEvent.STREAMING_ERROR, spotify._session_instance, error_type)
def logged_in(sp_session, sp_error): if not spotify._session_instance: return error_type = spotify.ErrorType(sp_error) if error_type == spotify.ErrorType.OK: logger.info('Spotify logged in') else: logger.error('Spotify login error: %r', error_type) spotify._session_instance.emit(SessionEvent.LOGGED_IN, spotify._session_instance, error_type)
def error(self): """An :class:`ErrorType` associated with the track. Check to see if there was problems loading the track. """ return spotify.ErrorType(lib.sp_track_error(self._sp_track))
def error(self): """An :class:`ErrorType` associated with the inbox post result. Check to see if there was problems posting to the inbox. """ return spotify.ErrorType(lib.sp_inbox_error(self._sp_inbox))
def error(self): """An :class:`ErrorType` associated with the search. Check to see if there was problems loading the search. """ return spotify.ErrorType(lib.sp_search_error(self._sp_search))