diff --git a/CHANGELOG.md b/CHANGELOG.md index 13d8d655..1e28a63c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ ### Changelog +#### Version - 2.5.3.12 - 4/4/2022 +* Allow featured modlists to exist in other repositories +* Continue to load the gallery even if a parse failure happens while loading a repository + +#### Version - 2.5.3.11 - 4/2/2022 +* New entry in `Links` named `discordURL` allows authors to add a discord link to their install page +* Reworks for decentralization + #### Version - 2.5.3.10 - 3/26/2022 * Report file sizes before generating patches * When displaying a browser, we now show the navigated to Url (and a copy to clipboard button) diff --git a/Wabbajack.CLI/Wabbajack.CLI.csproj b/Wabbajack.CLI/Wabbajack.CLI.csproj index 09194b63..c3a99955 100644 --- a/Wabbajack.CLI/Wabbajack.CLI.csproj +++ b/Wabbajack.CLI/Wabbajack.CLI.csproj @@ -6,9 +6,9 @@ wabbajack-cli Wabbajack x64 - 2.5.3.10 - 2.5.3.10 - Copyright © 2019-2021 + 2.5.3.12 + 2.5.3.12 + Copyright © 2019-2022 An automated ModList installer true win10-x64 diff --git a/Wabbajack.Launcher/Wabbajack.Launcher.csproj b/Wabbajack.Launcher/Wabbajack.Launcher.csproj index 9897a208..6ebb8f25 100644 --- a/Wabbajack.Launcher/Wabbajack.Launcher.csproj +++ b/Wabbajack.Launcher/Wabbajack.Launcher.csproj @@ -4,9 +4,9 @@ Exe net5.0-windows true - 2.5.3.10 - 2.5.3.10 - Copyright © 2019-2020 + 2.5.3.12 + 2.5.3.12 + Copyright © 2019-2022 Wabbajack Application Launcher true true diff --git a/Wabbajack.Lib/ModListRegistry/ModListMetadata.cs b/Wabbajack.Lib/ModListRegistry/ModListMetadata.cs index 3503274f..016e46dd 100644 --- a/Wabbajack.Lib/ModListRegistry/ModListMetadata.cs +++ b/Wabbajack.Lib/ModListRegistry/ModListMetadata.cs @@ -60,6 +60,8 @@ namespace Wabbajack.Lib.ModListRegistry public ModListSummary ValidationSummary { get; set; } = new ModListSummary(); [JsonName("repositoryName")] public string RepositoryName { get; set; } = string.Empty; [JsonIgnore] public string NamespacedName => $"{RepositoryName}/{Links.MachineURL}"; + + [JsonIgnore] public bool IsFeatured { get; set; } [JsonName("Links")] public class LinksObject @@ -120,41 +122,43 @@ namespace Wabbajack.Lib.ModListRegistry return repositories!; } + public static async Task> LoadFeatured() + { + var client = new Http.Client(); + var repositories = (await client.GetStringAsync("https://raw.githubusercontent.com/wabbajack-tools/mod-lists/master/featured_lists.json")) + .FromJsonString(); + return repositories!.ToHashSet(); + } + public static async Task LoadModlists() { var repos = await LoadRepositories(); + var featured = await LoadFeatured(); List metadatas = new(); var client = new Http.Client(); foreach (var repo in repos) { - var newData = (await client.GetStringAsync(repo.Value)) - .FromJsonString() - .Select(meta => - { - meta.RepositoryName = repo.Key; - return meta; - }); - metadatas.AddRange(newData); + try + { + var newData = (await client.GetStringAsync(repo.Value)) + .FromJsonString() + .Select(meta => + { + meta.RepositoryName = repo.Key; + meta.IsFeatured = meta.RepositoryName == "wj-featured" || featured.Contains(meta.NamespacedName); + return meta; + }); + metadatas.AddRange(newData); + } + catch (JsonException je) + { + Utils.Log($"Parsing {repo.Key} got a json parse exception {je}"); + } } return metadatas.ToArray(); } - public static async Task> LoadUnlistedFromGithub() - { - try - { - var client = new Http.Client(); - return (await client.GetStringAsync(Consts.UnlistedModlistMetadataURL)).FromJsonString>(); - } - catch (Exception) - { - Utils.LogStatus("Error loading unlisted modlists"); - return new List(); - } - - } - public async ValueTask NeedsDownload(AbsolutePath modlistPath) { if (!modlistPath.Exists) return true; diff --git a/Wabbajack/Wabbajack.csproj b/Wabbajack/Wabbajack.csproj index 8c70f8bf..47ac0ad0 100644 --- a/Wabbajack/Wabbajack.csproj +++ b/Wabbajack/Wabbajack.csproj @@ -6,9 +6,9 @@ true x64 win10-x64 - 2.5.3.10 - 2.5.3.10 - Copyright © 2019-2021 + 2.5.3.12 + 2.5.3.12 + Copyright © 2019-2022 An automated ModList installer true diff --git a/buildall.bat b/buildall.bat index 91e7ae7d..5a34b7a5 100644 --- a/buildall.bat +++ b/buildall.bat @@ -2,6 +2,8 @@ dotnet clean dotnet restore dotnet publish Wabbajack\Wabbajack.csproj --runtime win10-x64 --configuration Release /p:Platform=x64 -o M:\Games\wabbajack_files\app --self-contained dotnet publish Wabbajack.Launcher\Wabbajack.Launcher.csproj --runtime win10-x64 --configuration Release /p:Platform=x64 -o M:\Games\wabbajack_files\launcher --self-contained +dotnet publish c:\oss\Wabbajack\Wabbajack.CLI\Wabbajack.CLI.csproj --runtime win10-x64 --configuration Release /p:Platform=x64 -o M:\Games\wabbajack_files\cli --self-contained "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /t http://timestamp.sectigo.com M:\Games\wabbajack_files\launcher\Wabbajack.exe "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /t http://timestamp.sectigo.com M:\Games\wabbajack_files\app\Wabbajack.exe -"C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /t http://timestamp.sectigo.com M:\Games\wabbajack_files\app\wabbajack-cli.exe \ No newline at end of file +"C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /t http://timestamp.sectigo.com M:\Games\wabbajack_files\app\wabbajack-cli.exe +"C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /t http://timestamp.sectigo.com M:\Games\wabbajack_files\cli\wabbajack-cli.exe \ No newline at end of file