Exemple #1
0
 public void Logout()
 {
     if (libspotify.sp_session_connectionstate(session.SessionPtr) != libspotify.sp_connectionstate.LOGGED_OUT)
     {
         session.Logout();
         LoggedInUser = null;
     }
 }
Exemple #2
0
        public bool Login(string username, string password)
        {
            var loggedIn = session.Login(username, password);

            if (loggedIn)
            {
                LoggedInUser = session.GetCurrentUser();
                _logger.InfoFormat("Logged in as user: {0}", LoggedInUser.DisplayName);
                playlistContainer = new PlaylistContainer(session);
                _logger.InfoFormat("Found {0} playlists", playlistContainer.Playlists.Count);
                return true;
            }

            return false;
        }