@@ -12,7 +12,8 @@ public interface ITuxFamilyClient
1212// TuxFamily has had inconsistent connectivity and is seeminlgy down, so we just use the internet archive version.
1313public class TuxFamilyClient ( HttpClient httpClient , ILogger < TuxFamilyClient > logger ) : ITuxFamilyClient
1414{
15- private const string BaseUrl = "https://web.archive.org/web/20240927142429/https://downloads.tuxfamily.org/godotengine" ;
15+ // Use a stable archive snapshot; the live endpoint is unreliable.
16+ private const string BaseUrl = "https://web.archive.org/web/20211106101031if_/https://downloads.tuxfamily.org/godotengine" ;
1617
1718 // TODO: Replace with Task<Result<string, NetworkError>> GetSha512Async(Release godotRelease, CancellationToken cancellationToken)
1819 public async Task < string > GetSha512Async ( Release godotRelease , CancellationToken cancellationToken )
@@ -25,6 +26,7 @@ public async Task<string> GetSha512Async(Release godotRelease, CancellationToken
2526
2627 if ( response . IsSuccessStatusCode )
2728 {
29+ logger . LogInformation ( "Found SHA512 for {Version} at {Url}" , godotRelease . Version , url ) ;
2830 return await response . Content . ReadAsStringAsync ( cancellationToken ) ;
2931 }
3032
@@ -50,6 +52,7 @@ public async Task<HttpResponseMessage> GetZipFileAsync(string filename, Release
5052
5153 if ( response . IsSuccessStatusCode )
5254 {
55+ logger . LogInformation ( "Found {File} for {Release} at {Url}" , filename , godotRelease . ReleaseNameWithRuntime , url ) ;
5356 return response ;
5457 }
5558
@@ -66,13 +69,12 @@ public async Task<HttpResponseMessage> GetZipFileAsync(string filename, Release
6669
6770 private static string BuildUrl ( string filename , Release godotRelease )
6871 {
69- // stable is the root path on Tux Family
70- var baseUrl = godotRelease . Type is null || godotRelease . Type == "stable"
72+ var basePath = godotRelease . Type is null || godotRelease . Type == "stable"
7173 ? $ "{ BaseUrl } /{ godotRelease . Version } "
7274 : $ "{ BaseUrl } /{ godotRelease . Version } /{ godotRelease . Type } ";
7375
7476 return godotRelease . RuntimeEnvironment == RuntimeEnvironment . Mono
75- ? $ "{ baseUrl } /mono/{ filename } "
76- : $ "{ baseUrl } /{ filename } ";
77+ ? $ "{ basePath } /mono/{ filename } "
78+ : $ "{ basePath } /{ filename } ";
7779 }
7880}
0 commit comments