【问题标题】:Issue in Spotify searchSpotify 搜索中的问题
【发布时间】:2013-11-07 07:09:57
【问题描述】:
NSString *strUrlSearch=@"http://ws.spotify.com/search/1/track.json?q=kaizers+orchestra";
    [[SPSession sharedSession] searchForURL:[NSURL URLWithString:strUrlSearch] callback:^(SPSearch *search) {
        NSLog(@"search value %@",search);
        if (search != nil) {
            [SPAsyncLoading waitUntilLoaded:search timeout:kSPAsyncLoadingDefaultTimeout then:^(NSArray *loadedItems, NSArray *notLoadedItems) {
                NSLog(@"values %@",search);
                NSLog(@"values %@",search.tracks);
                NSLog(@"values %@",search.albums);

            }];
        }else{
            NSLog(@"search is nil ");
        }

    }];

我的输出是“搜索为零”..我真的很沮丧为什么它为零..请帮助我..问题是什么...

【问题讨论】:

    标签: ios objective-c spotify


    【解决方案1】:

    SPSearch 不接受 ws.spotify.com 链接。

    相反,直接给它搜索短语(而不是 URL 编码),如下所示:

    SPSearch *search = [SPSearch searchWithSearchQuery:@"kaisers orchestra"
                                             inSession:[SPSession sharedSession]];
    

    【讨论】:

    • 嗨伙计..它为我工作..我想知道更多的事情..我有 SPAlbums 或 SPArtists 对象..我如何从这些专辑和曲目中获取所有 SPTracks ?请帮帮我
    猜你喜欢
    • 1970-01-01
    • 2018-06-12
    • 2021-09-01
    • 2021-11-04
    • 2018-10-27
    • 2018-09-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多