revert Add PenumbraAPI & GlamourerAPI + Update API & Connector
This commit is contained in:
SirConstance
2025-09-03 17:46:47 +00:00
parent d58c73f41a
commit ed600cfb15
143 changed files with 1337 additions and 15731 deletions

View File

@@ -496,17 +496,17 @@ public class ServerConfigurationManager
private void EnsureMainExists()
{
bool elfExists = false;
bool lopExists = false;
for (int i = 0; i < _configService.Current.ServerStorage.Count; ++i)
{
var x = _configService.Current.ServerStorage[i];
if (x.ServerUri.Equals(ApiController.UmbraServiceUri, StringComparison.OrdinalIgnoreCase))
elfExists = true;
if (x.ServerUri.Equals(ApiController.UmbraSyncServiceUri, StringComparison.OrdinalIgnoreCase))
lopExists = true;
}
if (!elfExists)
if (!lopExists)
{
_logger.LogDebug("Re-adding missing server {uri}", ApiController.UmbraServiceUri);
_configService.Current.ServerStorage.Insert(0, new ServerStorage() { ServerUri = ApiController.UmbraServiceUri, ServerName = ApiController.UmbraServer });
_logger.LogDebug("Re-adding missing server {uri}", ApiController.UmbraSyncServiceUri);
_configService.Current.ServerStorage.Insert(0, new ServerStorage() { ServerUri = ApiController.UmbraSyncServiceUri, ServerName = ApiController.UmbraSyncServer });
if (_configService.Current.CurrentServer >= 0)
_configService.Current.CurrentServer++;
}