mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 15:22:55 +08:00
Always use production (non-experimental) endpoints for tournament client
This commit is contained in:
parent
3f2077a527
commit
26cd70f2bf
@ -16,6 +16,7 @@ using osu.Framework.IO.Stores;
|
|||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Online;
|
||||||
using osu.Game.Online.API.Requests;
|
using osu.Game.Online.API.Requests;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Tournament.IO;
|
using osu.Game.Tournament.IO;
|
||||||
@ -44,6 +45,14 @@ namespace osu.Game.Tournament
|
|||||||
return dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
return dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override EndpointConfiguration CreateEndpoints()
|
||||||
|
{
|
||||||
|
if (UseDevelopmentServer)
|
||||||
|
return base.CreateEndpoints();
|
||||||
|
|
||||||
|
return new ProductionEndpointConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
private TournamentSpriteText initialisationText;
|
private TournamentSpriteText initialisationText;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
19
osu.Game/Online/ExperimentalEndpointConfiguration.cs
Normal file
19
osu.Game/Online/ExperimentalEndpointConfiguration.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
namespace osu.Game.Online
|
||||||
|
{
|
||||||
|
public class ExperimentalEndpointConfiguration : EndpointConfiguration
|
||||||
|
{
|
||||||
|
public ExperimentalEndpointConfiguration()
|
||||||
|
{
|
||||||
|
WebsiteRootUrl = @"https://osu.ppy.sh";
|
||||||
|
APIEndpointUrl = @"https://lazer.ppy.sh";
|
||||||
|
APIClientSecret = @"FGc9GAtyHzeQDshWP5Ah7dega8hJACAJpQtw6OXk";
|
||||||
|
APIClientID = "5";
|
||||||
|
SpectatorEndpointUrl = "https://spectator.ppy.sh/spectator";
|
||||||
|
MultiplayerEndpointUrl = "https://spectator.ppy.sh/multiplayer";
|
||||||
|
MetadataEndpointUrl = "https://spectator.ppy.sh/metadata";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,16 +1,13 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace osu.Game.Online
|
namespace osu.Game.Online
|
||||||
{
|
{
|
||||||
public class ProductionEndpointConfiguration : EndpointConfiguration
|
public class ProductionEndpointConfiguration : EndpointConfiguration
|
||||||
{
|
{
|
||||||
public ProductionEndpointConfiguration()
|
public ProductionEndpointConfiguration()
|
||||||
{
|
{
|
||||||
WebsiteRootUrl = @"https://osu.ppy.sh";
|
WebsiteRootUrl = APIEndpointUrl = @"https://osu.ppy.sh";
|
||||||
APIEndpointUrl = @"https://lazer.ppy.sh";
|
|
||||||
APIClientSecret = @"FGc9GAtyHzeQDshWP5Ah7dega8hJACAJpQtw6OXk";
|
APIClientSecret = @"FGc9GAtyHzeQDshWP5Ah7dega8hJACAJpQtw6OXk";
|
||||||
APIClientID = "5";
|
APIClientID = "5";
|
||||||
SpectatorEndpointUrl = "https://spectator.ppy.sh/spectator";
|
SpectatorEndpointUrl = "https://spectator.ppy.sh/spectator";
|
||||||
|
@ -98,8 +98,8 @@ namespace osu.Game
|
|||||||
|
|
||||||
public virtual bool UseDevelopmentServer => DebugUtils.IsDebugBuild;
|
public virtual bool UseDevelopmentServer => DebugUtils.IsDebugBuild;
|
||||||
|
|
||||||
internal EndpointConfiguration CreateEndpoints() =>
|
public virtual EndpointConfiguration CreateEndpoints() =>
|
||||||
UseDevelopmentServer ? new DevelopmentEndpointConfiguration() : new ProductionEndpointConfiguration();
|
UseDevelopmentServer ? new DevelopmentEndpointConfiguration() : new ExperimentalEndpointConfiguration();
|
||||||
|
|
||||||
public virtual Version AssemblyVersion => Assembly.GetEntryAssembly()?.GetName().Version ?? new Version();
|
public virtual Version AssemblyVersion => Assembly.GetEntryAssembly()?.GetName().Version ?? new Version();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user