Browse Source

also fix a1111 launching with null weburl

pull/55/head
JT 1 year ago
parent
commit
2bb3692428
  1. 24
      StabilityMatrix.Core/Models/Packages/A3WebUI.cs

24
StabilityMatrix.Core/Models/Packages/A3WebUI.cs

@ -177,21 +177,17 @@ public class A3WebUI : BaseGitPackage
void HandleConsoleOutput(ProcessOutput s)
{
OnConsoleOutput(s);
if (s.Text.Contains("model loaded", StringComparison.OrdinalIgnoreCase))
{
OnStartupComplete(WebUrl);
}
if (s.Text.Contains("Running on", StringComparison.OrdinalIgnoreCase))
{
var regex = new Regex(@"(https?:\/\/)([^:\s]+):(\d+)");
var match = regex.Match(s.Text);
if (match.Success)
{
WebUrl = match.Value;
}
}
if (!s.Text.Contains("Running on", StringComparison.OrdinalIgnoreCase))
return;
var regex = new Regex(@"(https?:\/\/)([^:\s]+):(\d+)");
var match = regex.Match(s.Text);
if (!match.Success)
return;
WebUrl = match.Value;
OnStartupComplete(WebUrl);
}
var args = $"\"{Path.Combine(installedPackagePath, LaunchCommand)}\" {arguments}";

Loading…
Cancel
Save