Skip to content

Commit

Permalink
Merge pull request #531 from djlorenzouasset/dev
Browse files Browse the repository at this point in the history
authorization token change + check if a release is downloadable
  • Loading branch information
4sval authored Dec 14, 2024
2 parents 0882062 + 9a7d7ef commit 09da052
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion FModel/ViewModels/ApiEndpoints/EpicApiEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace FModel.ViewModels.ApiEndpoints;
public class EpicApiEndpoint : AbstractApiProvider
{
private const string _OAUTH_URL = "https://account-public-service-prod03.ol.epicgames.com/account/api/oauth/token";
private const string _BASIC_TOKEN = "basic MzQ0NmNkNzI2OTRjNGE0NDg1ZDgxYjc3YWRiYjIxNDE6OTIwOWQ0YTVlMjVhNDU3ZmI5YjA3NDg5ZDMxM2I0MWE=";
private const string _BASIC_TOKEN = "basic ZWM2ODRiOGM2ODdmNDc5ZmFkZWEzY2IyYWQ4M2Y1YzY6ZTFmMzFjMjExZjI4NDEzMTg2MjYyZDM3YTEzZmM4NGQ=";
private const string _APP_URL = "https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/public/assets/v2/platform/Windows/namespace/fn/catalogItem/4fe75bbc5a674f4f9b356b5c90567da5/app/Fortnite/label/Live";

public EpicApiEndpoint(RestClient client) : base(client) { }
Expand Down
4 changes: 2 additions & 2 deletions FModel/ViewModels/ApiEndpoints/GitHubApiEndpoint.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
using FModel.Framework;
using FModel.ViewModels.ApiEndpoints.Models;
using RestSharp;
Expand All @@ -9,7 +9,7 @@ public class GitHubApiEndpoint : AbstractApiProvider
{
public GitHubApiEndpoint(RestClient client) : base(client) { }

public async Task<GitHubCommit[]> GetCommitHistoryAsync(string branch = "dev", int page = 1, int limit = 20)
public async Task<GitHubCommit[]> GetCommitHistoryAsync(string branch = "dev", int page = 1, int limit = 30)
{
var request = new FRestRequest(Constants.GH_COMMITS_HISTORY);
request.AddParameter("sha", branch);
Expand Down
11 changes: 7 additions & 4 deletions FModel/ViewModels/UpdateViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
Expand Down Expand Up @@ -40,10 +40,13 @@ public async Task Load()
Commits.AddRange(await _apiEndpointView.GitHubApi.GetCommitHistoryAsync());

var qa = await _apiEndpointView.GitHubApi.GetReleaseAsync("qa");
qa.Assets.OrderByDescending(x => x.CreatedAt).First().IsLatest = true;
var assets = qa.Assets.OrderByDescending(x => x.CreatedAt).ToList();

foreach (var asset in qa.Assets)
for (var i = 0; i < assets.Count; i++)
{
var asset = assets[i];
asset.IsLatest = i == 0;

var commitSha = asset.Name.SubstringBeforeLast(".zip");
var commit = Commits.FirstOrDefault(x => x.Sha == commitSha);
if (commit != null)
Expand All @@ -69,6 +72,6 @@ public async Task Load()

public void DownloadLatest()
{
Commits.FirstOrDefault(x => x.Asset.IsLatest)?.Download();
Commits.FirstOrDefault(x => x.IsDownloadable && x.Asset.IsLatest)?.Download();
}
}
4 changes: 2 additions & 2 deletions FModel/Views/Snooper/Shading/Texture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ public void ImGuiTextureInspector()
SnimGui.Layout("Type");ImGui.Text($" : ({Format}) {Name}");
SnimGui.TooltipCopy("(?) Click to Copy Path", Path);
SnimGui.Layout("Guid");ImGui.Text($" : {Guid.ToString(EGuidFormats.UniqueObjectGuid)}");
SnimGui.Layout("Import");ImGui.Text($" : {ImportedWidth}x{ImportedHeight}");
SnimGui.Layout("Export");ImGui.Text($" : {Width}x{Height}");
SnimGui.Layout("Size");
ImGui.Text($" : {Width}x{Height}");

SnimGui.Layout("Swizzle");
for (int c = 0; c < SwizzleMask.Length; c++)
Expand Down

0 comments on commit 09da052

Please sign in to comment.