From a4e92b6c59c98a760803e7dbf482695fb0767310 Mon Sep 17 00:00:00 2001 From: Asval Date: Fri, 10 Oct 2025 14:03:38 +0200 Subject: [PATCH] migrated api endpoints over to UEDB --- CUE4Parse | 2 +- FModel/Settings/EndpointSettings.cs | 6 +++--- FModel/ViewModels/CUE4ParseViewModel.cs | 14 ++++++++++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CUE4Parse b/CUE4Parse index 2a200048..aa9ce2eb 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 2a200048c73d5381718e240f35a074186cc857cd +Subproject commit aa9ce2eb0e0dc9dee5f1e848c78d811246818c55 diff --git a/FModel/Settings/EndpointSettings.cs b/FModel/Settings/EndpointSettings.cs index a84c6867..36ab9990 100644 --- a/FModel/Settings/EndpointSettings.cs +++ b/FModel/Settings/EndpointSettings.cs @@ -16,8 +16,8 @@ public class EndpointSettings : ViewModel case "Fortnite [LIVE]": return new EndpointSettings[] { - new("https://fortnitecentral.genxgames.gg/api/v1/aes", "$.['mainKey','dynamicKeys']"), - new("https://fortnitecentral.genxgames.gg/api/v1/mappings", "$.[0].['url','fileName']") // just get the first available, not just oodle! (Unfortunately not default except when resetting settings) + new("https://uedb.dev/svc/api/v1/fortnite/aes", "$.['mainKey','dynamicKeys']"), + new("https://uedb.dev/svc/api/v1/fortnite/mappings", "$.mappings.Brotli") }; default: return new EndpointSettings[] { new(), new() }; @@ -106,4 +106,4 @@ public class EndpointSettings : ViewModel } } } -} \ No newline at end of file +} diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs index c851945d..0440ccc5 100644 --- a/FModel/ViewModels/CUE4ParseViewModel.cs +++ b/FModel/ViewModels/CUE4ParseViewModel.cs @@ -321,6 +321,9 @@ public class CUE4ParseViewModel : ViewModel await _threadWorkerView.Begin(cancellationToken => { + // deprecated values + if (endpoint.Url == "https://fortnitecentral.genxgames.gg/api/v1/aes") endpoint.Url = "https://uedb.dev/svc/api/v1/fortnite/aes"; + var aes = _apiEndpointView.DynamicApi.GetAesKeys(cancellationToken, endpoint.Url, endpoint.Path); if (aes is not { IsValid: true }) return; @@ -362,8 +365,15 @@ public class CUE4ParseViewModel : ViewModel } else if (endpoint.IsValid) { - var mappingsFolder = Path.Combine(UserSettings.Default.OutputDirectory, ".data"); + // deprecated values if (endpoint.Path == "$.[?(@.meta.compressionMethod=='Oodle')].['url','fileName']") endpoint.Path = "$.[0].['url','fileName']"; + if (endpoint.Url == "https://fortnitecentral.genxgames.gg/api/v1/mappings") + { + endpoint.Url = "https://uedb.dev/svc/api/v1/fortnite/mappings"; + endpoint.Path = "$.mappings.Brotli"; + } + + var mappingsFolder = Path.Combine(UserSettings.Default.OutputDirectory, ".data"); var mappings = _apiEndpointView.DynamicApi.GetMappings(CancellationToken.None, endpoint.Url, endpoint.Path); if (mappings is { Length: > 0 }) { @@ -372,7 +382,7 @@ public class CUE4ParseViewModel : ViewModel if (!mapping.IsValid) continue; var mappingPath = Path.Combine(mappingsFolder, mapping.FileName); - if (force || !File.Exists(mappingPath)) + if (force || !File.Exists(mappingPath) || new FileInfo(mappingPath).Length == 0) { _apiEndpointView.DownloadFile(mapping.Url, mappingPath); }