Correctly extract costume / sound hash for projects missing md5ext field #61
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.
Resolves
Some projects have costume or sound objects without an md5ext field. This is allowed by scratch-parser and scratch-vm. These changes help scratch-analysis extract the costume hash correctly in these cases.
I cannot figure out a good way to search for these projects in Kibana, but they appear as having a
-
instead of an md5 extension in thecostumeHash
field:Proposed Changes
If we're trying to extract the md5ext from a costume or sound object and it's missing, use the assetId and dataFormat instead. These two fields are required by our project format and validated by scratch-parser.
Test Coverage
Added a test and a test fixture (production Scratch project) which exhibits this problem.