This commit is contained in:
Timothy Baldridge 2022-04-09 13:56:37 -06:00
parent 84d7be1366
commit 3303109704
7 changed files with 39 additions and 9 deletions

View File

@ -1,5 +1,9 @@
### Changelog
#### Version - 2.5.3.13 - 4/9/2022
* Fix how the gallery displays featured lists from 3rd party repositories
* Readmes viewed from the gallery no longer route through the Wabbajack website
#### Version - 2.5.3.12 - 4/4/2022
* Allow featured modlists to exist in other repositories
* Continue to load the gallery even if a parse failure happens while loading a repository

View File

@ -6,8 +6,8 @@
<AssemblyName>wabbajack-cli</AssemblyName>
<Company>Wabbajack</Company>
<Platforms>x64</Platforms>
<AssemblyVersion>2.5.3.12</AssemblyVersion>
<FileVersion>2.5.3.12</FileVersion>
<AssemblyVersion>2.5.3.13</AssemblyVersion>
<FileVersion>2.5.3.13</FileVersion>
<Copyright>Copyright © 2019-2022</Copyright>
<Description>An automated ModList installer</Description>
<PublishReadyToRun>true</PublishReadyToRun>

View File

@ -4,8 +4,8 @@
<OutputType>Exe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<AssemblyVersion>2.5.3.12</AssemblyVersion>
<FileVersion>2.5.3.12</FileVersion>
<AssemblyVersion>2.5.3.13</AssemblyVersion>
<FileVersion>2.5.3.13</FileVersion>
<Copyright>Copyright © 2019-2022</Copyright>
<Description>Wabbajack Application Launcher</Description>
<PublishReadyToRun>true</PublishReadyToRun>

View File

@ -127,7 +127,7 @@ namespace Wabbajack.Lib.ModListRegistry
var client = new Http.Client();
var repositories = (await client.GetStringAsync("https://raw.githubusercontent.com/wabbajack-tools/mod-lists/master/featured_lists.json"))
.FromJsonString<string[]>();
return repositories!.ToHashSet();
return repositories!.ToHashSet(StringComparer.CurrentCultureIgnoreCase);
}
public static async Task<ModlistMetadata[]> LoadModlists()

View File

@ -154,7 +154,7 @@ namespace Wabbajack
return vm.Metadata.NSFW && showNSFW;
}))
.Filter(this.WhenAny(x => x.ShowUnofficial)
.Select<bool, Func<ModListMetadataVM, bool>>(ShowUnofficial => vm => vm.Metadata.RepositoryName == "wj-featured" || ShowUnofficial))
.Select<bool, Func<ModListMetadataVM, bool>>(ShowUnofficial => vm => vm.Metadata.IsFeatured || ShowUnofficial))
// Filter by Game
.Filter(this.WhenAny(x => x.GameType)
.Debounce(TimeSpan.FromMilliseconds(150), RxApp.MainThreadScheduler)

View File

@ -98,7 +98,9 @@ namespace Wabbajack
VersionText = "Modlist version : " + Metadata.Version;
IsBroken = metadata.ValidationSummary.HasFailures || metadata.ForceDown;
//https://www.wabbajack.org/#/modlists/info?machineURL=eldersouls
OpenWebsiteCommand = ReactiveCommand.Create(() => Utils.OpenWebsite(new Uri($"https://www.wabbajack.org/#/modlists/info?machineURL={Metadata.NamespacedName}")));
OpenWebsiteCommand = ReactiveCommand.Create(() => Utils.OpenWebsite(InterpretUrl(Metadata.Links.Readme)));
IsLoadingIdle = new Subject<bool>();
@ -206,6 +208,30 @@ namespace Wabbajack
.ToGuiProperty(this, nameof(LoadingImage));
}
private Uri InterpretUrl(string url)
{
if (Uri.TryCreate(url, UriKind.Absolute, out var parsed))
{
if (parsed.Host == "raw.githubusercontent.com")
{
var path = parsed.AbsolutePath.Split("/", StringSplitOptions.RemoveEmptyEntries);
var user = path[0];
var repo = path[1];
var rest = path[2..];
var newPath = new List<string>() {user, repo, "blob"};
newPath.AddRange(rest);
var b = new UriBuilder(url);
b.Host = "github.com";
b.Path = string.Join("/", newPath);
return b.Uri;
}
return parsed;
}
return new Uri("http://unknown");
}
private async Task<bool> Download()

View File

@ -6,8 +6,8 @@
<UseWPF>true</UseWPF>
<Platforms>x64</Platforms>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<AssemblyVersion>2.5.3.12</AssemblyVersion>
<FileVersion>2.5.3.12</FileVersion>
<AssemblyVersion>2.5.3.13</AssemblyVersion>
<FileVersion>2.5.3.13</FileVersion>
<Copyright>Copyright © 2019-2022</Copyright>
<Description>An automated ModList installer</Description>
<PublishReadyToRun>true</PublishReadyToRun>