From 957efbb712f4f53d026f54f1e3f2e0a9652bcfea Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 2 Mar 2026 00:17:59 -0500 Subject: [PATCH] Add disc page subpaths to builder as constants --- SabreTools.RedumpLib/Web/UrlBuilder.cs | 76 ++++++++++++++++++++++---- 1 file changed, 64 insertions(+), 12 deletions(-) diff --git a/SabreTools.RedumpLib/Web/UrlBuilder.cs b/SabreTools.RedumpLib/Web/UrlBuilder.cs index 3226483..0a15c63 100644 --- a/SabreTools.RedumpLib/Web/UrlBuilder.cs +++ b/SabreTools.RedumpLib/Web/UrlBuilder.cs @@ -93,8 +93,60 @@ namespace SabreTools.RedumpLib.Web #endregion - // TODO: Add other top-level paths - // TODO: Add path extensions for disc + #region /disc/{id}/ Subpaths + + /// + /// Path for individual disc page changes subpage + /// + private const string DiscPathChangesSubpath = "changes/"; + + /// + /// Path for individual disc page cuesheet download + /// + private const string DiscPathCueSubpath = "cue/"; + + /// + /// Path for individual disc page edit subpage + /// + private const string DiscPathEditSubpath = "edit/"; + + /// + /// Path for individual disc page GDI download + /// + private const string DiscPathGdiSubpath = "gdi/"; + + /// + /// Path for individual disc page key download + /// + private const string DiscPathKeySubpath = "key/"; + + /// + /// Path for individual disc page LSD download + /// + private const string DiscPathLsdSubpath = "lsd/"; + + /// + /// Path for individual disc page MD5 download + /// + private const string DiscPathMd5Subpath = "md5/"; + + /// + /// Path for individual disc page SBI download + /// + private const string DiscPathSbiSubpath = "sbi/"; + + /// + /// Path for individual disc page SFV download + /// + private const string DiscPathSfvSubpath = "sfv/"; + + /// + /// Path for individual disc page SHA-1 download + /// + private const string DiscPathSha1Subpath = "sha1/"; + + #endregion + // TODO: Add filter statements for discs #endregion @@ -132,25 +184,25 @@ namespace SabreTools.RedumpLib.Web sb.AppendFormat(DiscPath, +id); if (changes) - sb.Append("changes/"); + sb.Append(DiscPathChangesSubpath); else if (cue) - sb.Append("cue/"); + sb.Append(DiscPathCueSubpath); else if (edit) - sb.Append("edit/"); + sb.Append(DiscPathEditSubpath); else if (gdi) - sb.Append("gdi/"); + sb.Append(DiscPathGdiSubpath); else if (key) - sb.Append("key/"); + sb.Append(DiscPathKeySubpath); else if (lsd) - sb.Append("lsd/"); + sb.Append(DiscPathLsdSubpath); else if (md5) - sb.Append("md5/"); + sb.Append(DiscPathMd5Subpath); else if (sbi) - sb.Append("sbi/"); + sb.Append(DiscPathSbiSubpath); else if (sfv) - sb.Append("sfv/"); + sb.Append(DiscPathSfvSubpath); else if (sha1) - sb.Append("sha1/"); + sb.Append(DiscPathSha1Subpath); return sb.ToString(); }