[英]spotify ios sdk contentAPI fetchChildrenOfContentItem
I recently started to use this SDK and I realized that whenever I try to fetch one playlist tracks, the call to the method will always fetch the first 20 items, regardless of the playlist I have given it to as parameter.我最近开始使用这个 SDK,我意识到每当我尝试获取一个播放列表曲目时,对该方法的调用将始终获取前 20 个项目,而不管我将它作为参数提供给哪个播放列表。 I cannot find in the documentation a way to retrieve the next 20 tracks and so on.
我在文档中找不到检索接下来 20 首曲目等的方法。
Could you please help me sort this out?你能帮我解决这个问题吗?
Many thanks.非常感谢。
[[self appRemote].contentAPI fetchRootContentItemsForType:SPTAppRemoteContentTypeDefault callback:^(id _Nullable result, NSError * _Nullable error) {
[[PPLoader sharedLoader] HideHudLoader];
if(error!=nil) {
return;
}
NSArray *array = (NSArray*)result;
NSLog(@"context title: %@", self.playerState.contextTitle);
for (id<SPTAppRemoteContentItem>item in array) {
if ([item.title isEqual: @"Your Library"]) {
[[self appRemote].contentAPI fetchChildrenOfContentItem:item callback:^(id _Nullable result, NSError * _Nullable error) {
if(error!=nil) {
return;
}
for (id<SPTAppRemoteContentItem>item2 in (NSArray*)result) {
if ([item2.title isEqual: @"Playlists"]) {
[[self appRemote].contentAPI fetchChildrenOfContentItem:item2 callback:^(id _Nullable result, NSError * _Nullable error) {
if (error!= nil) {
return;
}
for(id<SPTAppRemoteContentItem> item3 in (NSArray*)result) {
NSLog(@"item3.title=%@ and self.playerState.contextTitle=%@", item3.title, self.playerState.contextTitle);
if([item3.title isEqualToString:self.playerState.contextTitle]) {
playlist = item3;
[[self appRemote].contentAPI fetchChildrenOfContentItem:playlist callback:^(id _Nullable result, NSError * _Nullable error) {
if (error != nil) {
return;
}
//arrMusicList = (NSMutableArray*)result;
[arrMusicList addObjectsFromArray:(NSMutableArray*)result];
compBlock(YES);
[tblList reloadData];
}];
break;
}
}
}];
}
}
}];
break;
}
}
}];
I'm having the same issue.我有同样的问题。 There is an issue entered in github, that says, it is limited to 20 results.
在 github 中输入了一个问题,即限制为 20 个结果。 :-(
:-(
https://github.com/spotify/ios-sdk/issues/172 https://github.com/spotify/ios-sdk/issues/172
Let me know, once you know a workaround.让我知道,一旦你知道一个解决方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.