我一直在尝试使用 ASIHTTP 库触发多个下载请求。我可以开始第一个请求的下载...但是当我将另一个 ASIHTTPRequest 添加到队列中时,它没有下载..你能不能建议让下一个下载开始..
-(void)createNewDownloadRequestWithURL:(NSString *)videoURL andProgressIndicator: (UIProgressView *)progressView andDelegate:(id)delegate
{
ASIHTTPRequest *request;
request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:videoURL]];
NSString * destFilePath = [[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:@"Videos"] stringByAppendingPathComponent:[videoURL lastPathComponent]];
[request setDownloadDestinationPath:destFilePath];
[request setDownloadProgressDelegate:progressView];
[request setAllowResumeForFileDownloads:YES];
[request setTemporaryFileDownloadPath:[NSString stringWithFormat:@"%@.download",destFilePath]];
[request setUserInfo:[NSDictionary dictionaryWithObjectsAndKeys:[videoURL lastPathComponent],@"name",delegate,@"delegate",nil]];
request.delegate = self;
request.tag = VIDEO_DOWNLOAD_REQUEST;
[networkQueue addOperation:request];
if(!isDownloadOn)
[networkQueue go];
isDownloadOn = YES;
}