SPTrack声明它已加载,但元数据不是

时间:2012-11-08 10:30:45

标签: ios spotify cocoalibspotify-2.0

有一次,我在SPTrack中加载了多个NSArray个。当在粗略的互联网连接上(即在加载期间连接/断开连接)时,我遇到了一些意外的(?)加载结果:跟踪包含在loadedItems数组中,但是没有加载它们的元数据。

根据SPTrack.hloadedYES时应加载所有数据:

/** Returns `YES` if the track has finished loading and all data is available. */ 
@property (nonatomic, readonly, getter=isLoaded) BOOL loaded;

我做错了什么,或者这可能是CocoaLibSpotify的问题?


我的代码:

[SPAsyncLoading waitUntilLoaded:tracks timeout:kTrackLoadingTimeout then:^(NSArray *loadedItems, NSArray *notLoadedItems) {
    for (SPTrack *track in loadedItems) {
            NSLog(@"%@ loaded %i", track, track.loaded);
    }

    // ... then do stuff with the loaded tracks

}];

控制台输出:

<SPTrack: 0xc65c180>: Teardrop loaded 1
<SPTrack: 0xc3d86f0>: (null) loaded 1
<SPTrack: 0xc3b5730>: (null) loaded 1
<SPTrack: 0xc3ca660>: (null) loaded 1
<SPTrack: 0xc3c9c50>: (null) loaded 1
<SPTrack: 0xc3c9cf0>: (null) loaded 1
<SPTrack: 0xc3c96c0>: (null) loaded 1
<SPTrack: 0xc3c9820>: (null) loaded 1
<SPTrack: 0xc3ca1a0>: (null) loaded 1
<SPTrack: 0xc3c9020>: (null) loaded 1
<SPTrack: 0xc36fcf0>: (null) loaded 1
<SPTrack: 0xc3c8e60>: (null) loaded 1
<SPTrack: 0xc3c8c00>: (null) loaded 1
<SPTrack: 0xc3c8920>: 5 O'Clock Featuring Lily Allen & Wiz Khalifa loaded 1
<SPTrack: 0xc3c8660>: (null) loaded 1
<SPTrack: 0xc394850>: (null) loaded 1
<SPTrack: 0xc3ec040>: (null) loaded 1
<SPTrack: 0xc3896a0>: (null) loaded 1
<SPTrack: 0xc3c83e0>: (null) loaded 1
<SPTrack: 0xc3be530>: (null) loaded 1

0 个答案:

没有答案