Beispiel #1
0
 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))
Beispiel #2
0
    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))
Beispiel #3
0
 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)
Beispiel #4
0
 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)
Beispiel #5
0
 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)
Beispiel #6
0
 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)
Beispiel #7
0
    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))
Beispiel #8
0
    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))
Beispiel #9
0
    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))