Smarter base file detection #7
Open
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.
Script now takes into account file name length when determining main file to base file to source metadata from, and for the dlc's to platform off of.
This is done with the expectation that filenames follow this scheme setup_{game-name}{version}{arch}_{gog-build-id}
and dlc follow
setup_{game-name}-{dlc-name}{version}{arch}_{gog-build-id}
if it gets the wrong base file using this schema then worse case scenerio this fork does nothing, but now in the average case scenerio where the name schemes match the base file will be done first and any dlc second.
e.g of correct naming schema:
setup_yakuza_kiwami_2_1.004a_(64bit)(65330).exe (this is base)
setup_yakuza_kiwami_2-clan_creator_bundle_1.004a(64bit)_(65330) (this is DLC content, the name is obviously longer)
e.g of cases where the schema is inneffective:
setup_enter_the_gungeon_2.1.9_(64bit)(29557) (base game)
setup_microtransaction_gun_2.1.9(29557) (this is dlc content, names shorter, doesn't follow the schema)