@@ -197,116 +197,6 @@ await GenshinInstall.DownloadPkgVersionStatic(httpClient,
197197 }
198198#nullable restore
199199
200- /*
201- private async Task BuildPrimaryManifestOld(DownloadClient downloadClient,
202- DownloadProgressDelegate downloadProgress,
203- List<PkgVersionProperties> assetIndex,
204- Dictionary<string, PkgVersionProperties> hashtableManifest,
205- CancellationToken token)
206- {
207- try
208- {
209- // Try Cleanup Download Profile file
210- TryDeleteDownloadPref();
211-
212- // Build basic file entry.
213- string manifestPath = Path.Combine(GamePath, "pkg_version");
214-
215- // Download basic package version list
216- var basicVerURL = CombineURLFromString(GameRepoURL, "pkg_version");
217- #if DEBUG
218- LogWriteLine($"Downloading pkg_version...\r\n\t{basicVerURL}", LogType.Debug, true);
219- #endif
220- await downloadClient.DownloadAsync(
221- basicVerURL,
222- EnsureCreationOfDirectory(manifestPath),
223- true,
224- progressDelegateAsync: downloadProgress,
225- maxConnectionSessions: DownloadThreadCount,
226- cancelToken: token
227- );
228-
229- // Download additional package lists
230- var dataVerPath = $@"{ExecPrefix}_Data\StreamingAssets\data_versions_streaming";
231- var dataVerURL = CombineURLFromString(GameRepoURL, dataVerPath);
232- #if DEBUG
233- LogWriteLine($"Downloading data_versions_streaming...\r\n\t{dataVerURL}", LogType.Debug, true);
234- #endif
235- await downloadClient.DownloadAsync(
236- dataVerURL,
237- EnsureCreationOfDirectory(Path.Combine(GamePath, dataVerPath)),
238- true,
239- progressDelegateAsync: downloadProgress,
240- maxConnectionSessions: DownloadThreadCount,
241- cancelToken: token
242- );
243-
244- var silenceVerPath = $@"{ExecPrefix}_Data\StreamingAssets\silence_versions_streaming";
245- var silenceVerURL = CombineURLFromString(GameRepoURL, silenceVerPath);
246- #if DEBUG
247- LogWriteLine($"Downloading silence_versions_streaming...\r\n\t{silenceVerURL}", LogType.Debug, true);
248- #endif
249- await downloadClient.DownloadAsync(
250- silenceVerURL,
251- EnsureCreationOfDirectory(Path.Combine(GamePath, silenceVerPath)),
252- true,
253- progressDelegateAsync: downloadProgress,
254- maxConnectionSessions: DownloadThreadCount,
255- cancelToken: token
256- );
257-
258- var resVerPath = $@"{ExecPrefix}_Data\StreamingAssets\res_versions_streaming";
259- var resVerURL = CombineURLFromString(GameRepoURL, resVerPath);
260- #if DEBUG
261- LogWriteLine($"Downloading res_versions_streaming...\r\n\t{resVerURL}", LogType.Debug, true);
262- #endif
263- await downloadClient.DownloadAsync(
264- resVerURL,
265- EnsureCreationOfDirectory(Path.Combine(GamePath, resVerPath)),
266- true,
267- progressDelegateAsync: downloadProgress,
268- maxConnectionSessions: DownloadThreadCount,
269- cancelToken: token
270- );
271-
272- var videoVerPath = $@"{ExecPrefix}_Data\StreamingAssets\VideoAssets\video_versions_streaming";
273- var videoVerURL = CombineURLFromString(GameRepoURL, videoVerPath);
274- #if DEBUG
275- LogWriteLine($"Downloading video_versions_streaming...\r\n\t{videoVerURL}", LogType.Debug, true);
276- #endif
277- await downloadClient.DownloadAsync(
278- videoVerURL,
279- EnsureCreationOfDirectory(Path.Combine(GamePath, videoVerPath)),
280- true,
281- progressDelegateAsync: downloadProgress,
282- maxConnectionSessions: DownloadThreadCount,
283- cancelToken: token
284- );
285-
286- // Parse basic package version.
287- var streamingAssetsPath = $@"{ExecPrefix}_Data\StreamingAssets";
288- ParseManifestToAssetIndex(manifestPath, "", assetIndex, hashtableManifest, GameRepoURL, true);
289-
290- // Build additional blks entry.
291- EnumerateManifestToAssetIndex(streamingAssetsPath, streamingAssetsPath, "data_versions_*", assetIndex, hashtableManifest,
292- GameRepoURL, true);
293- EnumerateManifestToAssetIndex(streamingAssetsPath, streamingAssetsPath, "silence_versions_*", assetIndex, hashtableManifest,
294- GameRepoURL, true);
295- EnumerateManifestToAssetIndex(streamingAssetsPath, streamingAssetsPath, "res_versions_*", assetIndex, hashtableManifest,
296- GameRepoURL, true);
297-
298- // Build cutscenes entry.
299- EnumerateManifestToAssetIndex(streamingAssetsPath, streamingAssetsPath, "VideoAssets\\*_versions_*", assetIndex, hashtableManifest,
300- GameRepoURL, true);
301- }
302- catch (Exception ex)
303- {
304- LogWriteLine($"Parsing primary manifest has failed!\r\n{ex}", LogType.Error, true);
305- ErrorSender.SendException(ex);
306- }
307- }
308- */
309-
310200 private void TryDeleteDownloadPref ( )
311201 {
312202 // Get the paths
0 commit comments