0
私はASIHTTPライブラリを使用して複数のダウンロード要求を発射しようとしています。 ...できますが、次のダウンロードが開始させるために、とにかくお勧めplzは..私は第一の要求のためのダウンロードを開始することができています...しかし、私はキューに別のASIHTTPRequestを追加するとき、そのは、ダウンロードしない実行中のASINetworkQueueに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;
}
私は以前同じことをやった...しかし、私のダウンロードの非は...リクエストを追加するための http://allseeing-i.com/ASIHTTPRequest/How-to-use 検索...意志にを開始書き込まれたnetworkQueueが何度も何度も呼び出す必要がないノート –