Skip to content

Commit

Permalink
temp fix: move jtbeta file to new common location (#198)
Browse files Browse the repository at this point in the history
* temp fix: move jtbeta file to new common location

* removed code
  • Loading branch information
mattpannella authored Dec 8, 2023
1 parent a9649d2 commit a20edaa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pocket_updater.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>2.37.0</Version>
<Version>2.38.0</Version>
<Description>Keep your Analogue Pocket up to date</Description>
<Copyright>2023 Matt Pannella</Copyright>
<Authors>Matt Pannella</Authors>
Expand Down
2 changes: 0 additions & 2 deletions src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ private static async Task Main(string[] args)
}
}

//path = "/Users/mattpannella/pocket-test";

updater = new PocketCoreUpdater(path);
settings = new SettingsManager(path);

Expand Down
7 changes: 5 additions & 2 deletions src/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,11 @@ private async Task JotegoRename(Core core)
private async Task CopyBetaKey(Core core)
{
if(core.JTBetaCheck()) {
core.platform_id = core.identifier.Split('.')[1]; //whatever
string path = Path.Combine(Factory.GetGlobals().UpdateDirectory, "Assets", core.platform_id, "common");
//core.platform_id = core.identifier.Split('.')[1]; //whatever
string path = Path.Combine(Factory.GetGlobals().UpdateDirectory, "Assets", "jtpatreon", "common");
if(!Directory.Exists(path)) {
Directory.CreateDirectory(path);
}
string keyPath = Path.Combine(Factory.GetGlobals().UpdateDirectory, "betakeys");
if(Directory.Exists(keyPath) && Directory.Exists(path)) {
Util.CopyDirectory(keyPath, path, false, true);
Expand Down
4 changes: 4 additions & 0 deletions src/models/Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ public async Task<Dictionary<string, Object>> DownloadAssets()
if(instance.instance.data_slots.Length > 0) {
string data_path = instance.instance.data_path;
foreach(Analogue.DataSlot slot in instance.instance.data_slots) {
var plat = info.metadata.platform_ids[0];
if(info.metadata.author == "jotego") {
plat = "jtpatreon";
}
if(!CheckBetaMD5(slot, info.metadata.platform_ids[0])) {
_writeMessage("Invalid or missing beta key.");
missingBetaKey = true;
Expand Down

0 comments on commit a20edaa

Please sign in to comment.