Fix MO2ArchiveName resolution

This commit is contained in:
halgari 2022-09-22 22:27:37 -05:00
parent 0774cb663d
commit e71abd82f7
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,8 @@
### Changelog ### Changelog
#### Version - 3.0.1.5 - 9/??/2022
* Fix MO2ArchiveName resolution
#### Version - 3.0.1.4 - 9/21/2022 #### Version - 3.0.1.4 - 9/21/2022
* Fix several of case sensitive path comparisons, that could result in deleting downloads * Fix several of case sensitive path comparisons, that could result in deleting downloads

View File

@ -242,6 +242,7 @@ public static class GameRegistry
NexusName = "witcher3", NexusName = "witcher3",
NexusGameId = 952, NexusGameId = 952,
MO2Name = "The Witcher 3: Wild Hunt", MO2Name = "The Witcher 3: Wild Hunt",
MO2ArchiveName = "witcher3",
SteamIDs = new[] {292030, 499450}, // normal and GotY SteamIDs = new[] {292030, 499450}, // normal and GotY
GOGIDs = new[] GOGIDs = new[]
{1207664643, 1495134320, 1207664663, 1640424747}, // normal, GotY and both in packages {1207664643, 1495134320, 1207664663, 1640424747}, // normal, GotY and both in packages
@ -458,8 +459,7 @@ public static class GameRegistry
public static GameMetaData? GetByMO2ArchiveName(string gameName) public static GameMetaData? GetByMO2ArchiveName(string gameName)
{ {
gameName = gameName.ToLower(); return Games.Values.FirstOrDefault(g => (g.MO2ArchiveName ?? g.NexusName)!.Equals(gameName, StringComparison.InvariantCultureIgnoreCase));
return Games.Values.FirstOrDefault(g => g.MO2ArchiveName?.ToLower() == gameName);
} }
public static GameMetaData? GetByNexusName(string gameName) public static GameMetaData? GetByNexusName(string gameName)