@@ -1011,7 +1011,7 @@ public async Task<bool> DownloadSingleSiteID(int id, string? outDir, bool rename
10111011 // View Edit History
10121012 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /changes/\" ") )
10131013 {
1014- string uri = string . Format ( Constants . DiscPageUrlTemplate , + id ) + Constants . DiscChangesSubpath ;
1014+ string uri = UrlBuilder . BuildDiscUrl ( id , changes : true ) ;
10151015 string ? remoteName = await DownloadFile ( uri , Path . Combine ( paddedIdDir , "changes.html" ) ) ;
10161016 if ( ! IgnoreErrors && remoteName is null )
10171017 return false ;
@@ -1021,7 +1021,7 @@ public async Task<bool> DownloadSingleSiteID(int id, string? outDir, bool rename
10211021 // CUE
10221022 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /cue/\" ") )
10231023 {
1024- string uri = string . Format ( Constants . DiscPageUrlTemplate , + id ) + Constants . DiscCueSubpath ;
1024+ string uri = UrlBuilder . BuildDiscUrl ( id , cue : true ) ;
10251025 string ? remoteName = await DownloadFile ( uri , Path . Combine ( paddedIdDir , $ "{ paddedId } .cue") ) ;
10261026 if ( ! IgnoreErrors && remoteName is null )
10271027 return false ;
@@ -1030,7 +1030,7 @@ public async Task<bool> DownloadSingleSiteID(int id, string? outDir, bool rename
10301030 // Edit disc
10311031 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /edit/\" ") )
10321032 {
1033- string uri = string . Format ( Constants . DiscPageUrlTemplate , + id ) + Constants . DiscEditSubpath ;
1033+ string uri = UrlBuilder . BuildDiscUrl ( id , edit : true ) ;
10341034 string ? remoteName = await DownloadFile ( uri , Path . Combine ( paddedIdDir , "edit.html" ) ) ;
10351035 if ( ! IgnoreErrors && remoteName is null )
10361036 return false ;
@@ -1039,7 +1039,7 @@ public async Task<bool> DownloadSingleSiteID(int id, string? outDir, bool rename
10391039 // GDI
10401040 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /gdi/\" ") )
10411041 {
1042- string uri = string . Format ( Constants . DiscPageUrlTemplate , + id ) + Constants . DiscGdiSubpath ;
1042+ string uri = UrlBuilder . BuildDiscUrl ( id , gdi : true ) ;
10431043 string ? remoteName = await DownloadFile ( uri , Path . Combine ( paddedIdDir , $ "{ paddedId } .gdi") ) ;
10441044 if ( ! IgnoreErrors && remoteName is null )
10451045 return false ;
@@ -1048,7 +1048,7 @@ public async Task<bool> DownloadSingleSiteID(int id, string? outDir, bool rename
10481048 // KEYS
10491049 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /key/\" ") )
10501050 {
1051- string uri = string . Format ( Constants . DiscPageUrlTemplate , + id ) + Constants . DiscKeySubpath ;
1051+ string uri = UrlBuilder . BuildDiscUrl ( id , key : true ) ;
10521052 string ? remoteName = await DownloadFile ( uri , Path . Combine ( paddedIdDir , $ "{ paddedId } .key") ) ;
10531053 if ( ! IgnoreErrors && remoteName is null )
10541054 return false ;
@@ -1057,7 +1057,7 @@ public async Task<bool> DownloadSingleSiteID(int id, string? outDir, bool rename
10571057 // LSD
10581058 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /lsd/\" ") )
10591059 {
1060- string uri = string . Format ( Constants . DiscPageUrlTemplate , + id ) + Constants . DiscLsdSubpath ;
1060+ string uri = UrlBuilder . BuildDiscUrl ( id , lsd : true ) ;
10611061 string ? remoteName = await DownloadFile ( uri , Path . Combine ( paddedIdDir , $ "{ paddedId } .lsd") ) ;
10621062 if ( ! IgnoreErrors && remoteName is null )
10631063 return false ;
@@ -1066,7 +1066,7 @@ public async Task<bool> DownloadSingleSiteID(int id, string? outDir, bool rename
10661066 // MD5
10671067 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /md5/\" ") )
10681068 {
1069- string uri = string . Format ( Constants . DiscPageUrlTemplate , + id ) + Constants . DiscMd5Subpath ;
1069+ string uri = UrlBuilder . BuildDiscUrl ( id , md5 : true ) ;
10701070 string ? remoteName = await DownloadFile ( uri , Path . Combine ( paddedIdDir , $ "{ paddedId } .md5") ) ;
10711071 if ( ! IgnoreErrors && remoteName is null )
10721072 return false ;
@@ -1085,7 +1085,7 @@ public async Task<bool> DownloadSingleSiteID(int id, string? outDir, bool rename
10851085 // SBI
10861086 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /sbi/\" ") )
10871087 {
1088- string uri = string . Format ( Constants . DiscPageUrlTemplate , + id ) + Constants . DiscSbiSubpath ;
1088+ string uri = UrlBuilder . BuildDiscUrl ( id , sbi : true ) ;
10891089 string ? remoteName = await DownloadFile ( uri , Path . Combine ( paddedIdDir , $ "{ paddedId } .sbi") ) ;
10901090 if ( ! IgnoreErrors && remoteName is null )
10911091 return false ;
@@ -1094,7 +1094,7 @@ public async Task<bool> DownloadSingleSiteID(int id, string? outDir, bool rename
10941094 // SFV
10951095 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /sfv/\" ") )
10961096 {
1097- string uri = string . Format ( Constants . DiscPageUrlTemplate , + id ) + Constants . DiscSfvSubpath ;
1097+ string uri = UrlBuilder . BuildDiscUrl ( id , sfv : true ) ;
10981098 string ? remoteName = await DownloadFile ( uri , Path . Combine ( paddedIdDir , $ "{ paddedId } .sfv") ) ;
10991099 if ( ! IgnoreErrors && remoteName is null )
11001100 return false ;
@@ -1103,7 +1103,7 @@ public async Task<bool> DownloadSingleSiteID(int id, string? outDir, bool rename
11031103 // SHA1
11041104 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /sha1/\" ") )
11051105 {
1106- string uri = string . Format ( Constants . DiscPageUrlTemplate , + id ) + Constants . DiscSha1Subpath ;
1106+ string uri = UrlBuilder . BuildDiscUrl ( id , sha1 : true ) ;
11071107 string ? remoteName = await DownloadFile ( uri , Path . Combine ( paddedIdDir , $ "{ paddedId } .sha1") ) ;
11081108 if ( ! IgnoreErrors && remoteName is null )
11091109 return false ;
0 commit comments