我正在使用以下代码加载播放列表
-(void)loadPlaylist:(NSString *)playlistURI withCompletionBlock:(spotifycompletionWithData)completionBlock andfailed:(failedBlock)failedBlock {
NSURL *playlistURL = [NSURL URLWithString:playlistURI];
[[SPSession sharedSession] playlistForURL:playlistURL callback:^(SPPlaylist *playlist) {
[SPAsyncLoading waitUntilLoaded:playlist timeout:kSPAsyncLoadingDefaultTimeout+10 then:^(NSArray *loadedItems, NSArray *notLoadedItems) {
if(notLoadedItems.count >= 1){
[SVProgressHUD dismiss];
failedBlock();
return;
}
self.playlist = [loadedItems lastObject];
}];
}];
}
我正在观察 playlist.loaded 属性,我看到它是的,但是当我查看 playlist.items 时,它们中的很多都是空的。我能做些什么?