From e20cac8a8078f07bae469559288adf95a38aa0ab Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 24 Sep 2020 10:57:09 -0700 Subject: [PATCH] Sync --- DICUI.Library/Web/RedumpWebClient.cs | 36 +++++++++++++++++++--------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/DICUI.Library/Web/RedumpWebClient.cs b/DICUI.Library/Web/RedumpWebClient.cs index 16d69f3a..4b009f49 100644 --- a/DICUI.Library/Web/RedumpWebClient.cs +++ b/DICUI.Library/Web/RedumpWebClient.cs @@ -104,7 +104,7 @@ namespace DICUI.Web /// /// Regex matching individual WIP disc links on a results page /// - private readonly Regex newDiscRegex = new Regex(@""); + private readonly Regex newDiscRegex = new Regex(@""); /// /// Regex matching the "partial match" ID list from a WIP disc page @@ -254,8 +254,9 @@ namespace DICUI.Web #region URL Extensions - private const string changesExt = "/changes/"; + private const string changesExt = "changes/"; private const string cueExt = "cue/"; + private const string editExt = "edit/"; private const string gdiExt = "gdi/"; private const string keyExt = "key/"; private const string lsdExt = "lsd/"; @@ -1115,7 +1116,7 @@ namespace DICUI.Web { try { - if (int.TryParse(match.Groups[1].Value, out int value)) + if (int.TryParse(match.Groups[2].Value, out int value)) ids.Add(value); } catch (Exception ex) @@ -1149,7 +1150,7 @@ namespace DICUI.Web { try { - if (int.TryParse(match.Groups[1].Value, out int value)) + if (int.TryParse(match.Groups[2].Value, out int value)) { bool downloaded = DownloadSingleWIPID(value, outDir, false); if (!downloaded && failOnSingle) @@ -1299,18 +1300,18 @@ namespace DICUI.Web // Create ID subdirectory Directory.CreateDirectory(paddedIdDir); - // HTML - using (var discStreamWriter = File.CreateText(Path.Combine(paddedIdDir, "disc.html"))) - { - discStreamWriter.Write(discPage); - } - - DownloadFile(string.Format(discPageUrl, +id) + changesExt, Path.Combine(paddedIdDir, "changes.html")); + // View Edit History + if (discPage.Contains($"