From e52cf78dce94ad179739967912ffb6591a616c4a Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Wed, 31 Jul 2024 12:47:12 -0500 Subject: [PATCH 1/2] Allow licenses to be absent from netkans --- Netkan/Validators/CkanValidator.cs | 1 + Netkan/Validators/NetkanValidator.cs | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Netkan/Validators/CkanValidator.cs b/Netkan/Validators/CkanValidator.cs index 4551d2a3de..2b26bc3042 100644 --- a/Netkan/Validators/CkanValidator.cs +++ b/Netkan/Validators/CkanValidator.cs @@ -17,6 +17,7 @@ public CkanValidator(IHttpService downloader, IModuleService moduleService, IGam new IsCkanModuleValidator(), new DownloadArrayValidator(), new TagsValidator(), + new LicensesValidator(), new InstallsFilesValidator(downloader, moduleService, game), new MatchesKnownGameVersionsValidator(game), new ObeysCKANSchemaValidator(), diff --git a/Netkan/Validators/NetkanValidator.cs b/Netkan/Validators/NetkanValidator.cs index 8023283515..2660852958 100644 --- a/Netkan/Validators/NetkanValidator.cs +++ b/Netkan/Validators/NetkanValidator.cs @@ -17,7 +17,6 @@ public NetkanValidator() new KrefValidator(), new AlphaNumericIdentifierValidator(), new RelationshipsValidator(), - new LicensesValidator(), new KrefDownloadMutexValidator(), new DownloadVersionValidator(), new OverrideValidator(), From 36a1fd5ccb8ee08c25dafbe2b4e660cd99c452ba Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Wed, 31 Jul 2024 12:55:55 -0500 Subject: [PATCH 2/2] Massage licenses from SpaceDock --- Netkan/Transformers/SpacedockTransformer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Netkan/Transformers/SpacedockTransformer.cs b/Netkan/Transformers/SpacedockTransformer.cs index a3d3106210..805264d596 100644 --- a/Netkan/Transformers/SpacedockTransformer.cs +++ b/Netkan/Transformers/SpacedockTransformer.cs @@ -106,7 +106,7 @@ private Metadata TransformOne(Metadata metadata, JObject json, SpacedockMod sdMo // "GPLv3" - Becomes "GPL-3.0" // "LGPL" - Specific version is indeterminate - var sdLicense = sdMod.license.Trim(); + var sdLicense = sdMod.license.Trim().Replace(' ', '-'); switch (sdLicense) {