{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"closed","user":{"avatar_url":"https://secure.gravatar.com/avatar/4fc57215bf79670eaf242df3dedb386c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4fc57215bf79670eaf242df3dedb386c","url":"https://api.github.com/users/jjpenney","login":"jjpenney","id":791224},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-01T16:51:48Z","comments":1,"closed_at":"2011-11-01T16:51:48Z","url":"https://api.github.com/repos/spotify/cocoalibspotify/issues/20","body":"It seems that you need to use a different SPSearch object if you plan to deal with the artist/album/tracks, separately.\r\n\r\nI noticed that if you call the following;\r\n\r\n[searchResults addTrackPage];\r\n\r\nThen ALL of the hasExhausted* variables are set to 'yes', even if the 'tracks' are not exhausted. The reason for this is because of the 'searchDidComplete' function. This iterates through the results and checks if there are any available results for each 'category' (artist/albums/tracks). Since we are only adding tracks, the number of returned objects for the albums and artists, will be 0. This causes a problem when the following is called in this function;\r\n\r\nself.hasExhaustedArtistResults = (artistCount < pageSize);\r\n\r\n&\r\n\r\nself.hasExhaustedAlbumResults = (albumCount < pageSize);\r\n\r\nObviously, artistCount and albumCount will be 0, because we're not adding anything for that 'category'.\r\n\r\nFor the moment, as my workaround, I've just set a few BOOL's to check whether we're actually adding pages for that particular category and this seems to work for me.","html_url":"https://github.com/spotify/cocoalibspotify/issues/20","number":20,"title":"Issue with SPSearch","id":2081076,"created_at":"2011-10-28T16:14:56Z"},"action":"closed"}