UEFN Live

it's in the same game as Fortnite [Live]
This commit is contained in:
Krowe Moh 2026-03-23 20:44:11 +11:00
parent 75e0f9589b
commit 3163711925
3 changed files with 35 additions and 0 deletions

View File

@ -11,6 +11,7 @@ namespace FModel.ViewModels.ApiEndpoints;
public class DillyApiEndpoint : AbstractApiProvider
{
private Backup[] _backups;
private ManifestInfoDilly[] _manifests;
public DillyApiEndpoint(RestClient client) : base(client) { }
@ -27,6 +28,19 @@ public class DillyApiEndpoint : AbstractApiProvider
return _backups ??= GetBackupsAsync(token).GetAwaiter().GetResult();
}
public async Task<ManifestInfoDilly[]> GetManifestsAsync(CancellationToken token)
{
var request = new FRestRequest($"https://export-service-new.dillyapis.com/v1/manifests");
var response = await _client.ExecuteAsync<ManifestInfoDilly[]>(request, token).ConfigureAwait(false);
Log.Information("[{Method}] [{Status}({StatusCode})] '{Resource}'", request.Method, response.StatusDescription, (int) response.StatusCode, response.ResponseUri?.OriginalString);
return response.Data;
}
public ManifestInfoDilly[] GetManifests(CancellationToken token)
{
return _manifests ??= GetManifestsAsync(token).GetAwaiter().GetResult();
}
public async Task<IDictionary<string, IDictionary<string, string>>> GetHotfixesAsync(CancellationToken token, string language = "en")
{
var request = new FRestRequest("https://api.fortniteapi.com/v1/cloudstorage/hotfixes")

View File

@ -23,6 +23,13 @@ public class Backup
[J] public string Url { get; private set; }
}
[DebuggerDisplay("{" + nameof(AppName) + "}")]
public class ManifestInfoDilly
{
[J] public string AppName { get; private set; }
[J] public string DownloadUrl { get; private set; }
}
public class Donator
{
[J] public string Username { get; private set; }

View File

@ -284,6 +284,20 @@ public class CUE4ParseViewModel : ViewModel
it => new FRandomAccessStreamArchive(it, manifest.FindFile(it)!.GetStream(), p.Versions));
});
var manifests = _apiEndpointView.DillyApi.GetManifests(cancellationToken);
var downloadUrl = manifests.First(x => x.AppName == "Fortnite_Studio").DownloadUrl;
using var client = new HttpClient();
var manifestBytes = client.GetByteArrayAsync(downloadUrl).GetAwaiter().GetResult();
var uefnManifest = FBuildPatchAppManifest.Deserialize(manifestBytes, manifestOptions);
Parallel.ForEach(uefnManifest.Files.Where(x => _fnLiveRegex.IsMatch(x.FileName)), fileManifest =>
{
p.RegisterVfs(fileManifest.FileName, [fileManifest.GetStream()],
it => new FRandomAccessStreamArchive(it, uefnManifest.FindFile(it)!.GetStream(), p.Versions));
});
var elapsedTime = Stopwatch.GetElapsedTime(startTs);
FLogger.Append(ELog.Information, () =>
FLogger.Text($"Fortnite [LIVE] has been loaded successfully in {elapsedTime.TotalMilliseconds:F1}ms", Constants.WHITE, true));