|
@@ -55,6 +55,11 @@
|
|
|
|
|
|
- (void)downloadFileFunServiceResponseFun:(NSData *)fileData with:(BOOL)isDownloadDone
|
|
- (void)downloadFileFunServiceResponseFun:(NSData *)fileData with:(BOOL)isDownloadDone
|
|
{
|
|
{
|
|
|
|
+ if(isDownloadDone){
|
|
|
|
+ [self handleDownloadDoneFun];
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
NSString *fileName = [self.curDownloadFileModel getFileNameFun];
|
|
NSString *fileName = [self.curDownloadFileModel getFileNameFun];
|
|
|
|
|
|
NSString*pathStr = [cachesFileManager getFilePathWithName:fileName type:DownLoadFileType];
|
|
NSString*pathStr = [cachesFileManager getFilePathWithName:fileName type:DownLoadFileType];
|
|
@@ -86,18 +91,13 @@
|
|
|
|
|
|
self.curDownloadFileModel.didDownloadBytes = didDownloadBytes;
|
|
self.curDownloadFileModel.didDownloadBytes = didDownloadBytes;
|
|
|
|
|
|
-// if(isDownloadDone){
|
|
|
|
-// NSInteger i;
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// if(endOfFile == self.curDownloadFileModel.length){
|
|
|
|
-// NSInteger i;
|
|
|
|
-// }
|
|
|
|
|
|
+
|
|
|
|
|
|
- if(isDownloadDone || endOfFile == self.curDownloadFileModel.length){
|
|
|
|
- [self handleDownloadDoneFun];
|
|
|
|
- }
|
|
|
|
- else{//获取下一片
|
|
|
|
|
|
+// if(isDownloadDone || endOfFile == self.curDownloadFileModel.length){
|
|
|
|
+// [self handleDownloadDoneFun];
|
|
|
|
+// }
|
|
|
|
+// else
|
|
|
|
+ {//获取下一片
|
|
|
|
|
|
[[downloadManager shareInstance] DownloadFileChangeingOneFileFun];
|
|
[[downloadManager shareInstance] DownloadFileChangeingOneFileFun];
|
|
|
|
|
|
@@ -121,6 +121,10 @@
|
|
if(image){
|
|
if(image){
|
|
[self loadImageFinished:image];
|
|
[self loadImageFinished:image];
|
|
}
|
|
}
|
|
|
|
+ else{
|
|
|
|
+ [cachesFileManager removeItemAtPath:fileName type:DownLoadFileType error:nil];
|
|
|
|
+ [[downloadManager shareInstance] DownloadFileFailOneFileFun];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
else if([self.curDownloadFileModel.fileType isEqualToString:@"video"]){
|
|
else if([self.curDownloadFileModel.fileType isEqualToString:@"video"]){
|
|
[self loadVideoFinished];
|
|
[self loadVideoFinished];
|