diff --git a/.all-contributorsrc b/.all-contributorsrc index ed9a4cab4..9fec7bb24 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -21,7 +21,7 @@ "mentoring", "maintenance", "review", - "projectManagement" + "projectManagement" ] }, { @@ -33,7 +33,7 @@ "code", "maintenance", "review", - "projectManagement" + "projectManagement" ] }, { @@ -43,11 +43,11 @@ "profile": "https://github.com/bagusnl", "contributions": [ "code", - "maintenance", - "review", - "promotion", - "infra", - "projectManagement" + "maintenance", + "review", + "promotion", + "infra", + "projectManagement" ] }, { @@ -196,6 +196,15 @@ "contributions": [ "bug" ] + }, + { + "login": "IhoFox", + "name": "IhoFox", + "avatar_url": "https://avatars.githubusercontent.com/u/133899447?v=4", + "profile": "https://github.com/IhoFox", + "contributions": [ + "translation" + ] } ], "repoType": "github" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 12313e6df..652033d06 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,11 +53,12 @@ jobs: dotnet publish CollapseLauncher -p:PublishProfile=Publish-PreviewRelease -p:PublishDir=".\preview-build\" - name: Upload Artifact (Release) - uses: actions/upload-artifact@v3.1.2 + uses: actions/upload-artifact@v4.3.1 if: ${{ matrix.configuration == 'Release' }} with: name: collapse_${{ matrix.platform }}-${{ matrix.configuration }}_${{ matrix.framework }}_${{ github.sha }} path: ./CollapseLauncher/preview-build/ + compression-level: 9 - name: Notify Discord uses: sarisia/actions-status-discord@v1.13.0 diff --git a/CollapseLauncher/Classes/RepairManagement/Genshin/Fetch.cs b/CollapseLauncher/Classes/RepairManagement/Genshin/Fetch.cs index 6b1aa026e..28215d7fa 100644 --- a/CollapseLauncher/Classes/RepairManagement/Genshin/Fetch.cs +++ b/CollapseLauncher/Classes/RepairManagement/Genshin/Fetch.cs @@ -7,7 +7,6 @@ using Hi3Helper.Shared.ClassStruct; using System; using System.Collections.Generic; -using System.Data; using System.IO; using System.Linq; using System.Security.Cryptography; @@ -63,7 +62,7 @@ private async ValueTask> Fetch(List assetIndex) private List EliminateUnnecessaryAssetIndex(IEnumerable assetIndex) { // Section: Eliminate unused audio files - List audioLangList = (_gameVersionManager as GameTypeGenshinVersion)._audioVoiceLanguageList; + List audioLangList = (_gameVersionManager as GameTypeGenshinVersion)!._audioVoiceLanguageList; string audioLangListPath = Path.Combine(_gamePath, $"{_execPrefix}_Data", "Persistent", "audio_lang_14"); // Get the list of audio lang list @@ -106,28 +105,69 @@ private async Task BuildPrimaryManifest(Http _httpClient, List BuildPersistentManifest(Http _httpClient, List assetIndex, Dictionary hashtableManifest, CancellationToken token) + private async Task BuildPersistentManifest(Http _httpClient, List assetIndex, + Dictionary hashtableManifest, CancellationToken token) { try { @@ -168,24 +209,37 @@ private async Task BuildPersistentManifest(Http _httpClient, List (byte)x).ToArray()); if (PrefTemplateBytes != null) File.WriteAllBytes(PersistentPath + "\\DownloadPref", PrefTemplateBytes); #nullable disable @@ -366,6 +420,7 @@ private void SavePersistentRevision(QueryProperty dispatchQuery) #endregion #region DispatcherParser + // ReSharper disable once UnusedParameter.Local private async Task GetDispatcherQuery(Http _httpClient, CancellationToken token) { // Initialize dispatch helper @@ -386,7 +441,7 @@ private async Task GetDispatcherQuery(Http _httpClient, Cancellat LogWriteLine(dFormat); #endif // Write the decrypted query response in the log (for diagnostic) - WriteLog(dFormat, LogType.Default); + WriteLog(dFormat); // Try decrypt the dispatcher, parse it and return it return await TryDecryptAndParseDispatcher(dispatchInfo, dispatchDecryptor, dispatchHelper); @@ -429,7 +484,7 @@ private async Task TryDecryptAndParseDispatcher(YSDispatchInfo di #if DEBUG LogWriteLine(dFormat); #endif - WriteLog(dFormat, LogType.Default); + WriteLog(dFormat); // Parse the dispatcher data in protobuf format and return it as QueryProperty await dispatchHelper.LoadDispatch(decryptedData); @@ -462,11 +517,14 @@ private void EnumerateManifestToAssetIndex(string path, string filter, List /// /// + /// private void ParseManifestToAssetIndex(string manifestPath, List assetIndex, Dictionary hashtable, string parentPath, string acceptedExtension, string parentURL, bool forceStoreInStreaming = false) { // Initialize local entry. + // ReSharper disable TooWideLocalVariableScope PkgVersionProperties entry; - bool isHashHasValue = false; + bool isHashHasValue; + // ReSharper restore TooWideLocalVariableScope // Iterate JSON that only contains defined extensions. foreach (string data in File.ReadAllLines(manifestPath).Where(x => x.EndsWith(acceptedExtension, StringComparison.OrdinalIgnoreCase))) @@ -477,12 +535,12 @@ private void ParseManifestToAssetIndex(string manifestPath, ListScald
Scald

💻 Iskandar Montano
Iskandar Montano

💻 Scighost
Scighost

🐛 + IhoFox
IhoFox

🌍