Skip to content

Commit 7049544

Browse files
committed
Revert "Update to new Oculus graph ql lib, update token stuff"
This reverts commit 40ac87c
1 parent 5b329c5 commit 7049544

File tree

3 files changed

+10
-31
lines changed

3 files changed

+10
-31
lines changed

Oculus Downgrader/API.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ public class ReleaseChannelReleaseBinary
1313
public long created_date { get; set; } = 0;
1414
public string extraLaunchArgs { get; set; } = "";
1515

16-
public static ReleaseChannelReleaseBinary FromAndroidBinary(OculusBinary a)
16+
public static ReleaseChannelReleaseBinary FromAndroidBinary(AndroidBinary a)
1717
{
1818
ReleaseChannelReleaseBinary b = new ReleaseChannelReleaseBinary();
1919
b.version = a.version;
2020
b.version_code = a.versionCode;
2121
b.id = a.id;
22-
b.created_date = a.created_date ?? 0;
22+
b.created_date = a.created_date;
2323
b.change_log = a.change_log;
2424
return b;
2525
}

Oculus Downgrader/Program.cs

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
using System.Text.Json;
1010
using System.Net;
1111
using System.IO.Compression;
12-
using System.IO.Pipes;
13-
using System.Net.Sockets;
1412
using System.Threading;
1513
using System.Security.Cryptography;
1614
using ComputerUtils.ADB;
@@ -29,15 +27,9 @@
2927
using OculusGraphQLApiLib.Results;
3028
using ComputerUtils.VarUtils;
3129
using ComputerUtils.CommandLine;
32-
using OculusDB;
3330
using QuestPatcher.Axml;
3431
using OculusGraphQLApiLib.Folders;
3532
using OculusDB.Database;
36-
using OculusDB.Search;
37-
using OculusGraphQLApiLib.GraphQL;
38-
using OpenQA.Selenium;
39-
using OpenQA.Selenium.Chrome;
40-
using OpenQA.Selenium.DevTools;
4133

4234
namespace RIFT_Downgrader
4335
{
@@ -46,7 +38,6 @@ class Program
4638
[STAThread]
4739
static void Main(string[] args)
4840
{
49-
// Handle oculus uri scheme
5041
Logger.SetLogFile(AppDomain.CurrentDomain.BaseDirectory + "Log.log");
5142
SetupExceptionHandlers();
5243
DowngradeManager.updater = new Updater("1.11.47", "https://github.com/ComputerElite/Oculus-downgrader", "Oculus Downgrader", Assembly.GetExecutingAssembly().Location);
@@ -84,19 +75,6 @@ static void Main(string[] args)
8475
DowngradeManager.commands.AddCommandLineArgument(new List<string> { "--versionstring" }, false, "VersionString of the game version to download/launch. Less precise than other version selecting", "versionstring"); // Done
8576
DowngradeManager.commands.AddCommandLineArgument(new List<string> { "--copyold" }, true, "If you want to backup your current install"); // Done
8677

87-
88-
if (args.Length == 1 && args[0].StartsWith("oculus://"))
89-
{
90-
string path = args[0].Replace("oculus://", "");
91-
Console.WriteLine(path);
92-
string[] parameters = path.Split('?')[1].Split('&');
93-
string token = parameters[0].Split('=')[1];
94-
string blob = parameters[1].Split('=')[1];
95-
File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + "etoken_tmp.txt", blob + "|" + token);
96-
Console.ReadLine();
97-
return;
98-
}
99-
10078
if(DowngradeManager.commands.HasArgument("imconfused"))
10179
{
10280
Console.WriteLine("How DARE you be confused. Get unconfused! https://youtu.be/TMrtLsQbaok?t=188");
@@ -1340,7 +1318,7 @@ public void ShowVersions(string appId)
13401318
undefinedEndProgressBar.UpdateProgress("Requesting version from Oculus due to version id existing");
13411319
try
13421320
{
1343-
Data<OculusBinary> hiddenApp = GraphQLClient.GetBinaryDetails(commands.GetValue("--versionid"));
1321+
Data<AndroidBinary> hiddenApp = GraphQLClient.GetBinaryDetails(commands.GetValue("--versionid"));
13441322
undefinedEndProgressBar.StopSpinningWheel();
13451323
Download(hiddenApp.data.node, appId, hiddenApp.data.node.binary_application.displayName);
13461324
}
@@ -1350,10 +1328,11 @@ public void ShowVersions(string appId)
13501328
Logger.Log("Request to Oculus failed. Requesting from OculusDB instead. OculusBB may not have every version: " + e);
13511329
try
13521330
{
1331+
DBVersion version = JsonSerializer.Deserialize<DBVersion>(new WebClient().DownloadString("https://oculusdb.rui2015.me/api/v1/id/" + commands.GetValue("--versionid")));
1332+
13531333
undefinedEndProgressBar.StopSpinningWheel();
1354-
DBVersion version = JsonSerializer.Deserialize<DBVersion>(new WebClient().DownloadString("https://oculusdb-rewrite.rui2015.me/api/v2/id/" + commands.GetValue("--versionid")));
1355-
OculusBinary b = new OculusBinary
1356-
{ version = version.version, versionCode = version.versionCode, id = version.id, change_log = version.changelog};
1334+
AndroidBinary b = new AndroidBinary
1335+
{ version = version.version, versionCode = version.versionCode, id = version.id, change_log = version.changeLog};
13571336
Download(b, appId, version.parentApplication.displayName);
13581337
}
13591338
catch (Exception ex)
@@ -1376,8 +1355,8 @@ public void ShowVersions(string appId)
13761355
{
13771356
if(config.requestVersionsFromOculus) throw new Exception("Forced request from Oculus");
13781357

1379-
Logger.Log("Requesting versions from https://oculusdb-rewrite.rui2015.me/api/v2/connected/" + appId + " and adding.");
1380-
s = JsonSerializer.Deserialize<ConnectedList>(webClient.DownloadString("https://oculusdb-rewrite.rui2015.me/api/v2/connected/" + appId));
1358+
Logger.Log("Requesting versions from https://oculusdb.rui2015.me/api/v1/connected/" + appId + " and adding.");
1359+
s = JsonSerializer.Deserialize<ConnectedList>(webClient.DownloadString("https://oculusdb.rui2015.me/api/v1/connected/" + appId));
13811360

13821361
appName = s.applications[0].displayName;
13831362
foreach (DBVersion b in s.versions)

OculusDB

0 commit comments

Comments
 (0)