Conversation
…assets (DesignV, NativeDataV)
We now check standard language codes in addition to to `mini-xx-xx` formats introduced recently by HoYoVerse in 2.8.0 preload.
Will now display "Downloading" or "Verifying" depending on what's being done.
Comment on lines
+382
to
+392
| () => metadataAudioV?.DataList.FirstOrDefault(x => x.Filename?.EndsWith(".pck", StringComparison.OrdinalIgnoreCase) ?? false), | ||
| context => context.Audio, | ||
| (context, replace) => context.Audio = replace, | ||
| token); | ||
| await baseUrl.TestAndSwapUrlAsync(client, | ||
| mainUrlAsbAlt.CombineURLFromString("Video"), | ||
| () => metadataVideoV?.DataList.FirstOrDefault(x => x.Filename?.EndsWith(".usm", StringComparison.OrdinalIgnoreCase) ?? false), | ||
| context => context.Video, | ||
| (context, replace) => context.Video = replace, | ||
| token); | ||
|
|
There was a problem hiding this comment.
Bug: After SwapAsbPersistentUrl() is called, TestAndSwapUrlAsync is invoked with identical primary and fallback URLs, causing the retry logic to fail without testing the original URL.
Severity: HIGH
Suggested Fix
When calling TestAndSwapUrlAsync after SwapAsbPersistentUrl, ensure the fallback URL parameter (urlBaseAlt) is set to the original primary URL, not the newly swapped alternate URL. This will allow the fallback mechanism to correctly test the original URL if the new one fails.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location:
CollapseLauncher/Classes/RepairManagement/StarRailV2/StarRailPersistentRefResult.cs#L379-L392
Potential issue: After `SwapAsbPersistentUrl()` is triggered, a subsequent call to
`TestAndSwapUrlAsync` for audio or video URLs results in the primary test URL and the
fallback URL being identical. For example, `baseUrl.Audio` is swapped to become the
alternate URL (`mainUrlAudioAlt`), and then `TestAndSwapUrlAsync` is called with both
the property to test and the fallback URL (`urlBaseAlt`) set to this same alternate URL.
If this URL returns a 404 error, the retry mechanism tests the same failing URL again,
throwing an `HttpRequestException` and preventing the repair operation from completing.
The original primary URL is never tested as a fallback, defeating the purpose of the
retry logic.
Did we get this right? 👍 / 👎 to inform future reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's changed? - 1.83.17
Full Changelog: CL-v1.83.16...CL-v1.83.17
Code Signing Policy