diff --git a/CHANGELOG.md b/CHANGELOG.md index 33c27a24..ef67a3df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ### Changelog +#### Version - 2.5.3.26 - 8/4/2022 +* Use the new VectorPlexis domain +* Use the new LoversLab API domain + #### Version - 2.5.3.25 - 6/29/2022 * Correctly modify Witcher 3 settings to the game accepts the values diff --git a/Wabbajack.App.Wpf/View Models/Compilers/CompilerVM.cs b/Wabbajack.App.Wpf/View Models/Compilers/CompilerVM.cs index e469f90a..7adb6f11 100644 --- a/Wabbajack.App.Wpf/View Models/Compilers/CompilerVM.cs +++ b/Wabbajack.App.Wpf/View Models/Compilers/CompilerVM.cs @@ -13,6 +13,7 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; using System.Windows.Media; +using System.Windows.Threading; using DynamicData; using Microsoft.WindowsAPICodePack.Dialogs; using ReactiveUI.Fody.Helpers; @@ -24,6 +25,7 @@ using Wabbajack.Models; using Wabbajack.Networking.WabbajackClientApi; using Wabbajack.Paths; using Wabbajack.Paths.IO; +using Wabbajack.RateLimiter; using Wabbajack.Services.OSIntegrated; namespace Wabbajack @@ -47,6 +49,9 @@ namespace Wabbajack private readonly ResourceMonitor _resourceMonitor; private readonly CompilerSettingsInferencer _inferencer; private readonly Client _wjClient; + + [Reactive] public string StatusText { get; set; } + [Reactive] public Percent StatusProgress { get; set; } [Reactive] public CompilerState State { get; set; } @@ -109,6 +114,9 @@ namespace Wabbajack _inferencer = inferencer; _wjClient = wjClient; + StatusText = "Compiler Settings"; + StatusProgress = Percent.Zero; + BackCommand = ReactiveCommand.CreateFromTask(async () => { @@ -241,6 +249,16 @@ namespace Wabbajack var compiler = MO2Compiler.Create(_serviceProvider, mo2Settings); + compiler.OnStatusUpdate += (sender, update) => + { + RxApp.MainThreadScheduler.Schedule(update, (scheduler, update) => + { + StatusText = update.StatusText; + StatusProgress = update.StepsProgress; + return Disposable.Empty; + }); + }; + await compiler.Begin(token); if (PublishUpdate) @@ -256,6 +274,10 @@ namespace Wabbajack } catch (Exception ex) { + StatusText = "Compilation Failed"; + StatusProgress = Percent.Zero; + + State = CompilerState.Errored; _logger.LogInformation(ex, "Failed Compilation : {Message}", ex.Message); } diff --git a/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml.cs b/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml.cs index b0145315..da7247a3 100644 --- a/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml.cs +++ b/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml.cs @@ -154,6 +154,18 @@ namespace Wabbajack this.Bind(ViewModel, vm => vm.MachineUrl, view => view.MachineUrl.Text) .DisposeWith(disposables); + this.Bind(ViewModel, vm => vm.StatusText, view => view.TopProgressBar.Title) + .DisposeWith(disposables); + + ViewModel.WhenAnyValue(vm => vm.StatusText) + .BindToStrict(this, view => view.TopProgressBar.Title) + .DisposeWith(disposables); + + ViewModel.WhenAnyValue(vm => vm.StatusProgress) + .Select(d => d.Value) + .BindToStrict(this, view => view.TopProgressBar.ProgressPercent) + .DisposeWith(disposables); + ViewModel.WhenAnyValue(vm => vm.AlwaysEnabled) .WhereNotNull() .Select(itms => itms.Select(itm => new RemovableItemViewModel(itm.ToString(), () => ViewModel.RemoveAlwaysEnabled(itm))).ToArray()) diff --git a/Wabbajack.Downloaders.IPS4OAuth2Downloader/LoversLabDownloader.cs b/Wabbajack.Downloaders.IPS4OAuth2Downloader/LoversLabDownloader.cs index 773090c5..5c19e4e5 100644 --- a/Wabbajack.Downloaders.IPS4OAuth2Downloader/LoversLabDownloader.cs +++ b/Wabbajack.Downloaders.IPS4OAuth2Downloader/LoversLabDownloader.cs @@ -13,7 +13,7 @@ public class LoversLabDownloader : AIPS4OAuth2Downloader logger, ITokenProvider loginInfo, HttpClient client, IHttpDownloader downloader, ApplicationInfo appInfo) : base(logger, loginInfo, client, downloader, appInfo, - new Uri("https://loverslab.com"), "Lovers Lab") + new Uri("https://api.loverslab.com"), "Lovers Lab") { } } \ No newline at end of file diff --git a/Wabbajack.Downloaders.IPS4OAuth2Downloader/VectorPlexusDownloader.cs b/Wabbajack.Downloaders.IPS4OAuth2Downloader/VectorPlexusDownloader.cs index 32c5ee95..f09a4403 100644 --- a/Wabbajack.Downloaders.IPS4OAuth2Downloader/VectorPlexusDownloader.cs +++ b/Wabbajack.Downloaders.IPS4OAuth2Downloader/VectorPlexusDownloader.cs @@ -14,7 +14,7 @@ public class public VectorPlexusDownloader(ILogger logger, ITokenProvider loginInfo, HttpClient client, IHttpDownloader downloader, ApplicationInfo appInfo) - : base(logger, loginInfo, client, downloader, appInfo, new Uri("https://vectorplexus.com"), "Vector Plexus") + : base(logger, loginInfo, client, downloader, appInfo, new Uri("https://vectorplexis.com"), "Vector Plexus") { } } \ No newline at end of file