public bool CheckABIsDone(string abName) { ABInfo abInfo = GetABInfo(abName); if (abInfo != null) { if (abInfo.state == ABInfoState.Success) { return(true); } if (abInfo.state == ABInfoState.Fail) { return(false); } if (abInfo.priority >= FileManifestOptions.FirstLoadPriority) { return(ManifestManager.CheckPersistentCrc(abInfo)); } else { return(true); } } return(false); }
internal void RunningTask(ABInfo abInfo, BackGroundQueue bQueue) { var userData = new object[] { abInfo, bQueue, }; if (ManifestManager.CheckPersistentCrc(abInfo)) //验证crc { webClients.Add(userData); // completa loadingTasks[abInfo] = abInfo; #if !HUGULA_NO_LOG Debug.LogFormat("RunningTask abName={0},Persistent is down frame={1}", abInfo.abName, Time.frameCount); #endif return; } else { if (abInfo.state == ABInfoState.Fail) { FileHelper.DeletePersistentFile(abInfo.abName); } var download = WebDownload.Get(); download.userData = userData; download.DownloadFileCompleted = OnDownloadFileCompleted; download.DownloadProgressChanged = OnDownloadProgressChanged; loadingTasks[abInfo] = download; string urlHost = hosts[0]; RealLoad(download, abInfo, bQueue, urlHost); } }