Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // - performSearchOperation:
- //
- - (void) performSearchOperation:(HGSCallbackSearchOperation *)operation
- {
- HGSQuery * query = [operation query];
- NSString * queryString = [[query tokenizedQueryString] originalString];
- if (!(search_ = [[JKPSpotifySearch alloc] initWithQuery:queryString]))
- {
- [operation finishQuery];
- return;
- }
- [search_ beginSearchWithCompletionHandler:
- ^(NSDictionary * results, NSError * error)
- {
- if ([operation isCancelled])
- return;
- if (error != nil)
- NSLog(@"Spotify query failed: %@",
- [[error userInfo] valueForKey:kJKPSpotifySearchErrorReasonKey]);
- else
- [operation setRankedResults:[self processResults:results
- forQuery:query]];
- [operation finishQuery];
- }];
- }
Add Comment
Please, Sign In to add comment