diff --git a/RedumpTool/Features/PacksFeature.cs b/RedumpTool/Features/PacksFeature.cs index 116acf3..40bff2f 100644 --- a/RedumpTool/Features/PacksFeature.cs +++ b/RedumpTool/Features/PacksFeature.cs @@ -67,8 +67,8 @@ namespace RedumpTool.Features _client.AttemptCount = attemptCount.Value; if (timeout != null && timeout > 0) _client.Timeout = TimeSpan.FromSeconds(timeout.Value); - _client.ForceDownload = forceDownload; - _client.ForceContinue = forceContinue; + _client.Overwrite = forceDownload; + _client.IgnoreErrors = forceContinue; // Login to Redump, if necessary _client.Login(username, password).Wait(); diff --git a/RedumpTool/Features/QueryFeature.cs b/RedumpTool/Features/QueryFeature.cs index b20b382..216c4cf 100644 --- a/RedumpTool/Features/QueryFeature.cs +++ b/RedumpTool/Features/QueryFeature.cs @@ -91,8 +91,8 @@ namespace RedumpTool.Features _client.AttemptCount = attemptCount.Value; if (timeout != null && timeout > 0) _client.Timeout = TimeSpan.FromSeconds(timeout.Value); - _client.ForceDownload = forceDownload; - _client.ForceContinue = forceContinue; + _client.Overwrite = forceDownload; + _client.IgnoreErrors = forceContinue; // Login to Redump, if necessary _client.Login(username, password).Wait(); diff --git a/RedumpTool/Features/SiteFeature.cs b/RedumpTool/Features/SiteFeature.cs index 9fcc1b1..05f1575 100644 --- a/RedumpTool/Features/SiteFeature.cs +++ b/RedumpTool/Features/SiteFeature.cs @@ -86,8 +86,8 @@ namespace RedumpTool.Features _client.AttemptCount = attemptCount.Value; if (timeout != null && timeout > 0) _client.Timeout = TimeSpan.FromSeconds(timeout.Value); - _client.ForceDownload = forceDownload; - _client.ForceContinue = forceContinue; + _client.Overwrite = forceDownload; + _client.IgnoreErrors = forceContinue; // Login to Redump, if necessary _client.Login(username, password).Wait(); diff --git a/RedumpTool/Features/UserFeature.cs b/RedumpTool/Features/UserFeature.cs index 53b597f..6b1790c 100644 --- a/RedumpTool/Features/UserFeature.cs +++ b/RedumpTool/Features/UserFeature.cs @@ -74,8 +74,8 @@ namespace RedumpTool.Features _client.AttemptCount = attemptCount.Value; if (timeout != null && timeout > 0) _client.Timeout = TimeSpan.FromSeconds(timeout.Value); - _client.ForceDownload = forceDownload; - _client.ForceContinue = forceContinue; + _client.Overwrite = forceDownload; + _client.IgnoreErrors = forceContinue; // Login to Redump, if necessary _client.Login(username, password).Wait(); diff --git a/RedumpTool/Features/WIPFeature.cs b/RedumpTool/Features/WIPFeature.cs index 0902e45..ae87c6d 100644 --- a/RedumpTool/Features/WIPFeature.cs +++ b/RedumpTool/Features/WIPFeature.cs @@ -86,8 +86,8 @@ namespace RedumpTool.Features _client.AttemptCount = attemptCount.Value; if (timeout != null && timeout > 0) _client.Timeout = TimeSpan.FromSeconds(timeout.Value); - _client.ForceDownload = forceDownload; - _client.ForceContinue = forceContinue; + _client.Overwrite = forceDownload; + _client.IgnoreErrors = forceContinue; // Login to Redump, if necessary _client.Login(username, password).Wait(); diff --git a/SabreTools.RedumpLib/Web/RedumpClient.cs b/SabreTools.RedumpLib/Web/RedumpClient.cs index 290dfd1..3dd7b04 100644 --- a/SabreTools.RedumpLib/Web/RedumpClient.cs +++ b/SabreTools.RedumpLib/Web/RedumpClient.cs @@ -51,12 +51,12 @@ namespace SabreTools.RedumpLib.Web /// /// Indicates if existing files will be overwritten /// - public bool ForceDownload { get; set; } = false; + public bool Overwrite { get; set; } = false; /// /// Indicates if download errors are ignored /// - public bool ForceContinue { get; set; } = false; + public bool IgnoreErrors { get; set; } = false; /// /// Internal client for interaction @@ -452,7 +452,7 @@ namespace SabreTools.RedumpLib.Web try { bool downloaded = await DownloadSingleSiteID(id, outDir, rename: false); - if (!downloaded && !ForceContinue) + if (!downloaded && !IgnoreErrors) return processed; processed.Add(id); @@ -547,7 +547,7 @@ namespace SabreTools.RedumpLib.Web try { bool downloaded = await DownloadSingleWIPID(id, outDir, rename: false); - if (!downloaded && !ForceContinue) + if (!downloaded && !IgnoreErrors) return processed; processed.Add(id); @@ -704,7 +704,7 @@ namespace SabreTools.RedumpLib.Web } // Check if the page has been updated since the last time it was downloaded, if possible - if (!ForceDownload && File.Exists(Path.Combine(paddedIdDir, "disc.html"))) + if (!Overwrite && File.Exists(Path.Combine(paddedIdDir, "disc.html"))) { // Read in the cached file var oldDiscPage = File.ReadAllText(Path.Combine(paddedIdDir, "disc.html")); @@ -747,7 +747,7 @@ namespace SabreTools.RedumpLib.Web { string uri = string.Format(Constants.DiscPageUrl, +id) + Constants.ChangesExt; string? remoteName = await DownloadFile(uri, Path.Combine(paddedIdDir, "changes.html")); - if (!ForceContinue && remoteName is null) + if (!IgnoreErrors && remoteName is null) return false; } @@ -757,7 +757,7 @@ namespace SabreTools.RedumpLib.Web { string uri = string.Format(Constants.DiscPageUrl, +id) + Constants.CueExt; string? remoteName = await DownloadFile(uri, Path.Combine(paddedIdDir, $"{paddedId}.cue")); - if (!ForceContinue && remoteName is null) + if (!IgnoreErrors && remoteName is null) return false; } @@ -766,7 +766,7 @@ namespace SabreTools.RedumpLib.Web { string uri = string.Format(Constants.DiscPageUrl, +id) + Constants.EditExt; string? remoteName = await DownloadFile(uri, Path.Combine(paddedIdDir, "edit.html")); - if (!ForceContinue && remoteName is null) + if (!IgnoreErrors && remoteName is null) return false; } @@ -775,7 +775,7 @@ namespace SabreTools.RedumpLib.Web { string uri = string.Format(Constants.DiscPageUrl, +id) + Constants.GdiExt; string? remoteName = await DownloadFile(uri, Path.Combine(paddedIdDir, $"{paddedId}.gdi")); - if (!ForceContinue && remoteName is null) + if (!IgnoreErrors && remoteName is null) return false; } @@ -784,7 +784,7 @@ namespace SabreTools.RedumpLib.Web { string uri = string.Format(Constants.DiscPageUrl, +id) + Constants.KeyExt; string? remoteName = await DownloadFile(uri, Path.Combine(paddedIdDir, $"{paddedId}.key")); - if (!ForceContinue && remoteName is null) + if (!IgnoreErrors && remoteName is null) return false; } @@ -793,7 +793,7 @@ namespace SabreTools.RedumpLib.Web { string uri = string.Format(Constants.DiscPageUrl, +id) + Constants.LsdExt; string? remoteName = await DownloadFile(uri, Path.Combine(paddedIdDir, $"{paddedId}.lsd")); - if (!ForceContinue && remoteName is null) + if (!IgnoreErrors && remoteName is null) return false; } @@ -802,7 +802,7 @@ namespace SabreTools.RedumpLib.Web { string uri = string.Format(Constants.DiscPageUrl, +id) + Constants.Md5Ext; string? remoteName = await DownloadFile(uri, Path.Combine(paddedIdDir, $"{paddedId}.md5")); - if (!ForceContinue && remoteName is null) + if (!IgnoreErrors && remoteName is null) return false; } @@ -812,7 +812,7 @@ namespace SabreTools.RedumpLib.Web var match = Constants.NewDiscRegex.Match(discPage); string uri = string.Format(Constants.WipDiscPageUrl, match.Groups[2].Value); string? remoteName = await DownloadFile(uri, Path.Combine(paddedIdDir, "newdisc.html")); - if (!ForceContinue && remoteName is null) + if (!IgnoreErrors && remoteName is null) return false; } @@ -821,7 +821,7 @@ namespace SabreTools.RedumpLib.Web { string uri = string.Format(Constants.DiscPageUrl, +id) + Constants.SbiExt; string? remoteName = await DownloadFile(uri, Path.Combine(paddedIdDir, $"{paddedId}.sbi")); - if (!ForceContinue && remoteName is null) + if (!IgnoreErrors && remoteName is null) return false; } @@ -830,7 +830,7 @@ namespace SabreTools.RedumpLib.Web { string uri = string.Format(Constants.DiscPageUrl, +id) + Constants.SfvExt; string? remoteName = await DownloadFile(uri, Path.Combine(paddedIdDir, $"{paddedId}.sfv")); - if (!ForceContinue && remoteName is null) + if (!IgnoreErrors && remoteName is null) return false; } @@ -839,7 +839,7 @@ namespace SabreTools.RedumpLib.Web { string uri = string.Format(Constants.DiscPageUrl, +id) + Constants.Sha1Ext; string? remoteName = await DownloadFile(uri, Path.Combine(paddedIdDir, $"{paddedId}.sha1")); - if (!ForceContinue && remoteName is null) + if (!IgnoreErrors && remoteName is null) return false; } @@ -961,7 +961,7 @@ namespace SabreTools.RedumpLib.Web } // Check if the page has been updated since the last time it was downloaded, if possible - if (!ForceDownload && File.Exists(Path.Combine(paddedIdDir, "disc.html"))) + if (!Overwrite && File.Exists(Path.Combine(paddedIdDir, "disc.html"))) { // Read in the cached file var oldDiscPage = File.ReadAllText(Path.Combine(paddedIdDir, "disc.html"));