Launcher 0.3.2: Updates aus Gitea-Releases, Server-Karte entfernt
Neueste Mod/Launcher-Version und Neuigkeiten kommen von git.mbm.wtf (bso-release.json mit Signatur), die Website ist nur noch Reserve (mit -dev zuerst). SPIELEN auf der Startseite startet ohne Server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
-1
@@ -75,7 +75,16 @@ public static class Api
|
||||
// --- Freunde und Lobby (alles mit dem Konto-Token)
|
||||
public static Task<Result> Get(string path, string token) => Send(HttpMethod.Get, path, null, token);
|
||||
public static Task<Result> Post(string path, string token, object? body = null) => Send(HttpMethod.Post, path, body ?? new { }, token);
|
||||
public static async Task<Release?> Latest(string product)
|
||||
/// <summary>Gegen eine Test-Website (-dev, BSO_LAUNCHER_API)? Dann kommen Releases zuerst von dort.</summary>
|
||||
public static bool TestWebsite => Base != BaseUrl.TrimEnd('/');
|
||||
|
||||
/// <summary>Neueste Version: vom Git-Server (Gitea-Releases), sonst von der Website - mit -dev umgekehrt.</summary>
|
||||
public static async Task<Release?> Latest(string product) =>
|
||||
TestWebsite
|
||||
? await WebsiteLatest(product) ?? await GiteaReleases.Latest(product)
|
||||
: await GiteaReleases.Latest(product) ?? await WebsiteLatest(product);
|
||||
|
||||
static async Task<Release?> WebsiteLatest(string product)
|
||||
{
|
||||
var r = await Send(HttpMethod.Get, "/api/releases/latest?product=" + product, null, null);
|
||||
if (!r.Ok) return null;
|
||||
|
||||
Reference in New Issue
Block a user