From 89404a9b037258188800e3f7ebca3760e2dcafdc Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Mon, 28 Jun 2021 21:02:01 -0600 Subject: [PATCH] 2.5.0.5 --- CHANGELOG.md | 4 ++++ Wabbajack.CLI/Properties/launchSettings.json | 2 +- Wabbajack.CLI/Wabbajack.CLI.csproj | 4 ++-- Wabbajack.Launcher/Wabbajack.Launcher.csproj | 4 ++-- .../CompilationSteps/MatchSimilarTextures.cs | 2 +- .../AbstractIPS4OAuthDownloader.cs | 21 +++++++++++++++++-- Wabbajack.Server/Wabbajack.Server.csproj | 4 ++-- Wabbajack/Wabbajack.csproj | 4 ++-- 8 files changed, 33 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 248d8711..d72b17a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ### Changelog +#### Version - 2.5.0.5 - 6/28/2021 +* Fix another NPE on texture matching +* Better logging on bad calls to IPS4 sites + #### Version - 2.5.0.4 - 6/27/2021 * Fix for NPE in Texture analysis compiler step * Implemented attachment support in IPS4 sites diff --git a/Wabbajack.CLI/Properties/launchSettings.json b/Wabbajack.CLI/Properties/launchSettings.json index e60f336f..fa6e610c 100644 --- a/Wabbajack.CLI/Properties/launchSettings.json +++ b/Wabbajack.CLI/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "Wabbajack.CLI": { "commandName": "Project", - "commandLineArgs": "download-from-meta -m c:\\tmp\\test.meta -o c:\\tmp\\out.7z" + "commandLineArgs": "download-from-meta -m \"c:\\tmp\\test (2).meta\" -o c:\\tmp\\out.7z" } } } \ No newline at end of file diff --git a/Wabbajack.CLI/Wabbajack.CLI.csproj b/Wabbajack.CLI/Wabbajack.CLI.csproj index e66a55a2..f25d1078 100644 --- a/Wabbajack.CLI/Wabbajack.CLI.csproj +++ b/Wabbajack.CLI/Wabbajack.CLI.csproj @@ -6,8 +6,8 @@ wabbajack-cli Wabbajack x64 - 2.5.0.4 - 2.5.0.4 + 2.5.0.5 + 2.5.0.5 Copyright © 2019-2020 An automated ModList installer true diff --git a/Wabbajack.Launcher/Wabbajack.Launcher.csproj b/Wabbajack.Launcher/Wabbajack.Launcher.csproj index 897c88fb..b722e6d6 100644 --- a/Wabbajack.Launcher/Wabbajack.Launcher.csproj +++ b/Wabbajack.Launcher/Wabbajack.Launcher.csproj @@ -4,8 +4,8 @@ Exe net5.0-windows true - 2.5.0.4 - 2.5.0.4 + 2.5.0.5 + 2.5.0.5 Copyright © 2019-2020 Wabbajack Application Launcher true diff --git a/Wabbajack.Lib/CompilationSteps/MatchSimilarTextures.cs b/Wabbajack.Lib/CompilationSteps/MatchSimilarTextures.cs index 69693d17..60e99e20 100644 --- a/Wabbajack.Lib/CompilationSteps/MatchSimilarTextures.cs +++ b/Wabbajack.Lib/CompilationSteps/MatchSimilarTextures.cs @@ -22,7 +22,7 @@ namespace Wabbajack.Lib.CompilationSteps public override async ValueTask Run(RawSourceFile source) { - if (source.Path.Extension == DDS) + if (source.Path.Extension == DDS && source.File.ImageState != null) { var found = _byName[source.Path.FileNameWithoutExtension] .Select(f => (f.ImageState.PerceptualHash.Similarity(source.File.ImageState.PerceptualHash), f)) diff --git a/Wabbajack.Lib/Downloaders/AbstractIPS4OAuthDownloader.cs b/Wabbajack.Lib/Downloaders/AbstractIPS4OAuthDownloader.cs index eb511971..726787ef 100644 --- a/Wabbajack.Lib/Downloaders/AbstractIPS4OAuthDownloader.cs +++ b/Wabbajack.Lib/Downloaders/AbstractIPS4OAuthDownloader.cs @@ -13,6 +13,7 @@ using F23.StringSimilarity; using Newtonsoft.Json; using ReactiveUI; using Wabbajack.Common; +using Wabbajack.Common.Exceptions; using Wabbajack.Common.Serialization.Json; using Wabbajack.Lib.Downloaders.DTOs; using Wabbajack.Lib.Http; @@ -93,8 +94,24 @@ namespace Wabbajack.Lib.Downloaders public async Task GetDownloads(long modID) { - var responseString = await (await GetAuthedClient())!.GetStringAsync(SiteURL+ $"api/downloads/files/{modID}") ; - return responseString.FromJsonString(); + var url = SiteURL + $"api/downloads/files/{modID}"; + var client = await GetAuthedClient(); + using var response = await client!.GetAsync(url, HttpCompletionOption.ResponseHeadersRead, errorsAsExceptions: false); + string body = ""; + try + { + body = await response.Content.ReadAsStringAsync(); + } + catch (Exception _) + { + // ignored + } + + if (response.IsSuccessStatusCode) + return body.FromJsonString(); + + Utils.Log($"IPS4 Request Error {response.StatusCode} {response.ReasonPhrase} - \n {url} \n {body}"); + throw new HttpException(response); } diff --git a/Wabbajack.Server/Wabbajack.Server.csproj b/Wabbajack.Server/Wabbajack.Server.csproj index a9a88fc0..ed16efd1 100644 --- a/Wabbajack.Server/Wabbajack.Server.csproj +++ b/Wabbajack.Server/Wabbajack.Server.csproj @@ -3,8 +3,8 @@ Exe net5.0-windows - 2.5.0.4 - 2.5.0.4 + 2.5.0.5 + 2.5.0.5 Copyright © 2019-2020 Wabbajack Server win-x64 diff --git a/Wabbajack/Wabbajack.csproj b/Wabbajack/Wabbajack.csproj index d715f61c..2f18d6d8 100644 --- a/Wabbajack/Wabbajack.csproj +++ b/Wabbajack/Wabbajack.csproj @@ -6,8 +6,8 @@ true x64 win10-x64 - 2.5.0.4 - 2.5.0.4 + 2.5.0.5 + 2.5.0.5 Copyright © 2019-2020 An automated ModList installer true